Hi!

That isn't a very lengthy description. What do you mean "not able to send"? 
Where does the request fail? Have you tried debugging via dev 
tools/console/network tab etc.?

The CORS headers seams okay, but are you sure it actually is present in the 
response (console -> network tab again, inspect the headers of the request) - 
it might be possible that headers are already sent when you try to set the CORS 
header and it fails.

Please try to be more elaborate next time you are asking for help or 
experiencing an issue - as most of us (afaik) are not really in possession of 
clairvoyant powers - we can only build off of what you share with us. :)

Cheers
Flaki


On Tuesday, July 23, 2013 6:38:36 PM UTC, jose llopis wrote:
> hi i 've recently got a zte open and im not able to send a cross domain ajax 
> transaction with this code on 
> 
> client
> 
> $.ajax({
>          url:"http://192.168.1.4/webappServer/login.php";,
>          type:"POST",
>          data: { 
>             user: $("#txtU").val(),
>             pass: $("#txtP").val()
>         },
>          success:function(data){
>             if(data!=-1)
>             {
>                 data=$.parseJSON(data);
>                 sessionStorage.setItem("loginID",data.id);
>                 sessionStorage.setItem("nick",data.nick);
>                 location.href="app.html";
>             }
>             else
>             {
>                 alert("error");
>             }
>          }
>     });
> 
> Login php has 
> 
> this header
> 
> header('Access-Control-Allow-Origin: *');
> 
> any idea?

_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to