Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Feb 2010
    Posts
    33
    Thanks
    6
    Thanked 0 Times in 0 Posts

    onchange change selected value

    Is it possible for one select box to change the shown selection of another? i.e. not rebuild the list of the other select but simply 'select' a different value from the list

    I've got one select with options:

    Gas
    Laser

    and another with options

    £100
    £200
    £300

    I want it so that if you select gas, it selects £200 from the other, but still allows the user to override it and select a different value if they choose. And if laser is selected, its selects £300 from the other.

    thanks

  • #2
    Senior Coder
    Join Date
    Dec 2010
    Posts
    2,396
    Thanks
    12
    Thanked 569 Times in 562 Posts
    Like this?

    Hint: If you hover the mouse over the example page you will see a button "Edit in jsbin.com" which you can use to view the full source (HTML/Javascript) of the example.

  • #3
    New Coder
    Join Date
    Feb 2010
    Posts
    33
    Thanks
    6
    Thanked 0 Times in 0 Posts
    looks great! thanks i'll try and implement it to my site

  • #4
    New Coder
    Join Date
    Aug 2010
    Location
    myeik
    Posts
    81
    Thanks
    6
    Thanked 5 Times in 5 Posts
    Quote Originally Posted by devnull69 View Post
    Like this?

    Hint: If you hover the mouse over the example page you will see a button "Edit in jsbin.com" which you can use to view the full source (HTML/Javascript) of the example.
    is it your site ? http://jsbin.com/

    really nice

  • #5
    Senior Coder
    Join Date
    Dec 2010
    Posts
    2,396
    Thanks
    12
    Thanked 569 Times in 562 Posts
    Mine? No! This is courtesy of Remy Sharp (@rem on Twitter)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •