changing form action based on selection

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • legen1991
    New Member
    • Mar 2013
    • 1

    changing form action based on selection

    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?
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    Your thread has been moved to the javascript forum because you will need to use code to do that.

    Comment

    • Dormilich
      Recognized Expert Expert
      • Aug 2008
      • 8694

      #3
      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.

      Comment

      Working...