Recently, I decided to experiment with AJAX while trying to incorporate form validation from a database before allowing users to submit content. However, I encountered an issue with the URL segment of the Open function. It seems that when I use the full URL like , it doesn't work. Yet, if I simply use 'file.php' as the relative path, everything functions correctly. Can anyone shed light on what may be causing this specific problem and generally provide insight into the rules for the URL section of the Open function? Thank you in advance for any assistance provided; your swift responses never fail to amaze me.
xmlhttp.open("GET","myFile.php",true); WORKS FINE
xmlhttp.open("GET","http://www.mywebsite.com/folder/myFile.php",true); DOES NOT WORK?