Changing the selected value of a select element based on the value of another select

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pmccarthy
    New Member
    • Aug 2007
    • 1

    Changing the selected value of a select element based on the value of another select

    Hi All,

    I have been searching the net for hours but have not found anything that does the trick. I am looking for a simple code that will look at one select drop down and anchange modify a second drop down.

    This is specifically for a calendar function like outlook.

    So if I change box one to 08:30, the second drop down will automatically change to 09:00. Likewise if the first was changed to 10:30 the second would change to 11:00, etc.

    Maybe someone has a script that does something like this already? Any help would be most appreciated.

    Thanks,
  • pbmods
    Recognized Expert Expert
    • Apr 2007
    • 5821

    #2
    Heya, pmccarthy. Welcome to TSDN!

    Changed thread title to better describe the problem (did you know that threads whose titles contain phrases such as, 'help required' actually get FEWER responses?).

    Comment

    • acoder
      Recognized Expert MVP
      • Nov 2006
      • 16032

      #3
      Originally posted by pmccarthy
      Hi All,

      I have been searching the net for hours but have not found anything that does the trick. I am looking for a simple code that will look at one select drop down and anchange modify a second drop down.

      This is specifically for a calendar function like outlook.

      So if I change box one to 08:30, the second drop down will automatically change to 09:00. Likewise if the first was changed to 10:30 the second would change to 11:00, etc.

      Maybe someone has a script that does something like this already? Any help would be most appreciated.

      Thanks,
      Post your code.

      Do both the select elements have the same option values?

      Comment

      Working...