How to check existing file before loading (.load()) to HTML element?
$("#ok").load("announcement.txt",function(){alert("Successfully Loaded");});
The above query shows the msg "Successfully Loaded" when the file "announcement.txt" is missing in the folder also. How to check whether the file exists or Not before loading it to an HTML element using JQ?