John Herdean
Posts: 0
Joined: Tue May 14, 2013 3:56 am

Previous Successful JS Code worked, now no more to change popup on success of service request

The following JS code worked before on a success of a service request:

if(data.response=="-1") {
$.mobile.changePage("profile_not_saved.html", {transition: "pop"});
}
else {
$.mobile.changePage("profile_saved.html", {transition: "pop"});

Now, when I try to load the page the service is being invoked it just crashes and the Firebug console gives this error:

Image

Do I have to rewrite the JS code?

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Previous Successful JS Code worked, now no more to change popup on success of service request

Hi John - please double check you have a syntax error 'onError' - on the screenshot you have provided.

John Herdean
Posts: 0
Joined: Tue May 14, 2013 3:56 am

Previous Successful JS Code worked, now no more to change popup on success of service request

this JS is exactly the same code I used before and worked just fine... Where do you see a syntax error?

if(data.response=="-1") {
$.mobile.changePage("profile_not_saved.html", {transition: "pop"});
}
else {
$.mobile.changePage("profile_saved.html", {transition: "pop"});

John Herdean
Posts: 0
Joined: Tue May 14, 2013 3:56 am

Previous Successful JS Code worked, now no more to change popup on success of service request

yes i see that, but where in the code is it wrong?

John Herdean
Posts: 0
Joined: Tue May 14, 2013 3:56 am

Previous Successful JS Code worked, now no more to change popup on success of service request

i just dont see where the JS i wrote theres any syntax problem especially since the same exact code was used like a couple weeks ago and worked just fine...
Please point out where in this JS is wrong:

if(data.response=="-1") {
$.mobile.changePage("profile_not_saved.html", {transition: "pop"});
}
else {
$.mobile.changePage("profile_saved.html", {transition: "pop"});

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Previous Successful JS Code worked, now no more to change popup on success of service request

There is nothing wrong in this part of the code, please debug it in part that shown in console.

John Herdean
Posts: 0
Joined: Tue May 14, 2013 3:56 am

Previous Successful JS Code worked, now no more to change popup on success of service request

well, i clicked on it and got this:

Image

it looks like a bug from your side... please let me know what this is? thanks

Return to “Issues”