I need help with the following code please:
http://jsfiddle.net/geetyn6f/422/
What I need to do is to write the URL in the input
And then when I press 'Check' the answer will appear in the second input instead of the alert.
URL: <input type="text" name="name">
<button type="submit" value="Submit">Check</button>
Answer: <input type="text" name="answer">
$.ajax({
url:'http://www.example.com/3.zip',
error: function()
{
alert('file does not exists');
},
success: function()
{
alert('file exists');
}
});
// Now to check if file exists call function
checkIfRemoteFileExists('http://www.yoursite.com/abc.html');
checkIfRemoteFileExists('http://www.google.de');