469,276 Members | 1,645 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,276 developers. It's quick & easy.

Checkbox redirection using JavaScript

55
How would you design a webpage <form> which contains a "checkbox" that when checked and the 'submit' button is pressed will automatically redirect the user to another webpage??

If the "checkbox" is not checked and the 'submit' button is pressed, then it will not direct user to another webpage.

I want to use JavaScript for this.
Jun 2 '10 #1
4 1532
Dormilich
8,651 Expert Mod 8TB
you are aware that this won’t work with JavaScript disabled?

basically, you just need to return the .checked property of that checkbox onsubmit (if checked, submit is executed, otherwise not).
Jun 2 '10 #2
neogazz
55
By default is 'JavaScript' turned off on all IE and FireFox webpages?

Thanks for the reply.
Jun 3 '10 #3
Dormilich
8,651 Expert Mod 8TB
that depends on the User. if (s)he uses the NoScript Add-on, (one of the most downloaded Add-ons!), that’s the default action (turning JS off).
Jun 3 '10 #4
neogazz
55
Many thanks, excellent advice!
Jun 3 '10 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by Mike N. | last post: by
1 post views Thread by Ramakrishnan Nagarajan | last post: by
2 posts views Thread by Greg G | last post: by
2 posts views Thread by simon.wilkinson | last post: by
2 posts views Thread by AmitKu | last post: by
6 posts views Thread by Peter Afonin | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.