So I'm using jquerymobile for an app I'm creating. I have a link that if all the validation passes I'd like to go through, but if something fails I'd like to redirect.
In the jquery something like this. Since it is jquerymobile the link will be a new div on the same index.html page - if that helps.
$(#link).click(function(){ if(validation_fails) link_elsewhere; else return true; }
You can use the window.location to redirect a browser:
https://developer.mozilla.org/en/DOM/window.location
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With