By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,968 Members | 1,541 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,968 IT Pros & Developers. It's quick & easy.

changing form action based on selection

P: 1
Hey, I been stumped for a few hours now, I am trying to have my formaction change based on the selection in the drop down box. For instance I have a drop down box that includes site A, site B and site C. If i click on site A have it direct me there, Click site B have it direct me there. I know I can create a menu and list or what not but it wont look the same as if it were in a dropdown box.

So I am using a form since it looks better, is this possible?
Mar 26 '13 #1
Share this Question
Share on Google+
2 Replies


Rabbit
Expert Mod 10K+
P: 12,430
Your thread has been moved to the javascript forum because you will need to use code to do that.
Mar 26 '13 #2

Dormilich
Expert Mod 5K+
P: 8,639
So I am using a form since it looks better, is this possible?
depends on if you want to forward immediately *and* if you need to submit further data. if you donít have further data, a form simply does not make sense and you should be using window.location.href. as for selection, you can use the change or blur events on the <select> element.
Mar 27 '13 #3

Post your reply

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