javascript - CORS on phonegap not working -


I got the code from my PC through the browser to get the code to work cross domain from my PC. But while running the code to PhoneGrap it is no longer working. I've given permission for Internet and access originals * so it should be able to access all webpages. What more do I need to enable?

  & lt; Html & gt; & Lt; Top & gt; & Lt; Script src = "js / jquery-1.11.0.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" charset = "utf-8" src = "cordova.js" & gt; & Lt; / Script & gt; & Lt; Link rel = "stylesheet" type = "text / css" href = "css / bootstrap.css" /> & Lt; Script & gt; Function Dologin () {var senddata = $ ('# form'). Serialize (); Warning (senddata); $ AZ ({type: 'post', url: 'XXXXXXXX', data: senddata, crossDomain: true, dataType: 'json', success: function (response) {if (response.success == true) warning ("Error: "+ Error threso);}); Warning ("NAY");}, Error: Task (XMLHttpRequest, textStatus, errorThrown) {console.log ("Status:" + textStatus); ; return false; }; & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; H1 & gt; Logging in & lt; / H1> & Lt; Form id = "form" onsubmit = "return dolgen ();" & Gt; & Lt; div class = "form-group" & gt; & Lt; Label = "email" & gt; Epost & lt; / Label & gt; & Lt; Input type = "email" class = "form-control" name = "email" value = "test@test.no" placeholder = "apost" & gt; & Lt; / Div & gt; & Lt; div class = "form-group" & gt; & Lt; Label = "password" & gt; Passed & lt; / Label & gt; & Lt; Input type = "password" class = "form-control" name = "password" value = "test" placeholder = "password" & gt; & Lt; / Div & gt; & Lt; Div class = "checkbox" & gt; & Lt; Label & gt; & Lt; Input type = "checkbox" name = "remember" & gt; Husky Meg & lt; / Labels & gt; & Lt; / Div & gt; & Lt; Button type = "submit" class = "btn btn-primary" & gt; Logging in & lt; / Button & gt; & Lt; / Form & gt; & Lt; Div class = "login-help" & gt; & Lt; P & gt; Glemt passcourt? & Lt; A href = "index.html" & gt; Try it ÃÆ'à ¢ â,¬Å¡Ãƒâ € šÃ, Andrett et lt; / A & gt; To try & Lt; / P & gt; & Lt; / Div & gt; & Lt; / Body & gt; & Lt; / Html & gt;    

Try to include this line in AJAX call

  header: {"cache-control": "no-cache"}    

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -