- This topic has 2 replies, 2 voices, and was last updated 13 years, 9 months ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
Support site for Tips and Tricks HQ premium products
by
Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › WP eStore Tweaks › Hey Amin, here's a geeky question for you…
I’d like to insert the following code on my sales page for my site that you’ll find here: http://www.warriorforum.com/programming-talk/275734-unblockable-exit-url-redirector-script.html
and it’s basically a redirector is someone tries to leave the page. Now, I’d like to be able to set the ‘exit’ value to false if they click the buy now button. Any idea on a fast way to accomplish this?
Cheers!
Frank
There is an “onsubmit” parameter in the form for the buy now button. It calls a function called “ReadForm1” which is stored in the “lib/eStore_read_form.js” file. You can add in that exit value in that function.
The best way to do this would be to use JQuery. Using plain javascript to control the action of a button which is already doing other stuff is not very clean.
I don’t understand why you would want to hook that script to the buy now button though? Do you simply want to redirect the user to a URL when they click the button?
No, I want to make it so if they try to click away from the sales page, it will open a second page with more information. But if they click the BUY button, I don’t want this activated of course.
Frank