JSFiddle - React, Tailwind, and code Playground

HTML

<form id="sform" method="POST" name="form1" action="">
        <div>
            <label for="name">Enter website</label>
            <input id="name" type="text" name="sitename">
            <input type="submit" value="Get metadata" name="sbutton" id="sbutton" onclick="document.getElementById('wf').style.display = 'inline-block';">
            <input type="submit" value="Write to file" name="wfbutton" id="wf" />
        </div>
    </form>

JavaScript

$("#sbutton").click(function () {
        event.preventDefault();
        $.ajax({
            url: "https://i.imgur.com/fHyEMsl.jpg",
            type: "GET",
            data: {
                sitename: $("#name").val()
            },
            success: function(data){
                alert("Success");
            }, 
            error: function(){
            		alert('error');
            }
        });
    });