0

I am using firefox 3 and IE 6, 7 to test if a simple php web page using JQuery Post to pass some data to and from another server web page.

$(document).ready(function(){ 

   $("#data\\[User\\]\\[name\\]").click(function(){ 

      var usr=$("#data\\[User\\]\\[name\\]").val();

   if(usr.length >= 4){     

      $("#username").append('<span id="loaderimg" name="loaderimg"><img align="absmiddle" src="loader.gif"/> Checking data availability,&nbsp;please wait.</span>');

      var url =  "http://mysite.com/site1/toavail/"+usr;    
      $.post(
      url,    
      function(data) {alert(data);});
}

   });
});
//-->
</script>


<table border=0 width="100%">
<tr>
    <td>Username</td>
    <td>       
        <div id="username">
    <input type="text" name="data[User][name]" id="data[User][name]">
    </div>       
        </td>
</tr>
</table>

In Firefox 3, the alert box showed empty message. In IE 6 and IE 7, I got an error message saying "Permssion denied"

user327712
  • 3,291
  • 4
  • 37
  • 45

1 Answers1

1

I think the error appears because of the cross-domain Post.

You can read here about PHP walkaround. Also check out this SO question: How do I send a cross-domain POST request via JavaScript?

Community
  • 1
  • 1
Piotr Rochala
  • 7,748
  • 2
  • 33
  • 54