471,888 Members | 1,706 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,888 software developers and data experts.

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 1559
Dormilich
8,658 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,658 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
reply views Thread by zermasroor | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.