I get this error when I launch my webpage in IE (the code works fine in other browsers).
This is the HTML code:
<!DOCTYPE html> <html> <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script> </head> <body> <--- some html code ---> <iframe src='http://localhost/page1.php' style="background: transparent; overflow: hidden; height: 210px; width: 390px;" frameborder="0" /> </body> </html>
This is page1.php
<!DOCTYPE html> <html> <body> <form action="usercheck.php" method="POST"> USERNAME:<input name="uname" id="uname" type="text" maxlength="12" required/> <input type="submit" value="Submit"> </form> </body> </html>
This is usercheck.php
<?php <!DOCTYPE html> <html> <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script> </head> <body> <--- some html code ---> </body> </html>
The problem is that when I reach usercheck.php after clicking the submit button in page1.php I get the error message http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js. Access is denied. http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js. Access is denied. Here is the error image: http://i.stack.imgur.com/diCoF.jpg . Then, therefore, I get an error that the "$" character is undefined (due to the inability to load the jquery library).
Edit- I tried including the jquery file on my server, but still an error is sent. I also tried this code for usercheck.php:
<!DOCTYPE html> <html> <head> <script type="text/javascript"> </script> </head> <body> <--- some html code ---> </body> </html>
The error I get this time is: http://i.stack.imgur.com/hR9aN.jpg (Original usercheck2.php: rscheck.php on my server). Then, therefore, I get an error that the "$" character is undefined (due to the inability to load the jquery library). If I directly open the contents of page1.php (by url-localhost / page1.php), everything works fine.
This is the only code I'm using jQuery for:
if($("#pret").contents().text().search("NAMECHECK: NOTAVALIBLE")!=-1)
I could exclude jquery only if I can convert this code to javascript.
source share