I need to redirect user to another page called “free.php” from index page, if the user checked the check-box without url change using jquery. I have created an example here,
Here the check box is validating, but I couldn’t redirect to free.php.Though I am new to jquery and ajax, I couldn’t find the answer. what I need to change in my code?
Thanks!
Not possible to redirect using an
$.ajaxcall unless you physically redirect in one of the handlers. But, that would defeat your intent of not changing the browser url.The only ways to not change the browser’s URL is to:
iframeand and change it’s source tofree.phpHandle
ajaxand injectHTMLresponse fromfree.phpinto theDOM: