FAQ abt. JavaScript

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chumma
    New Member
    • Feb 2007
    • 4

    FAQ abt. JavaScript

    how can i pass the <select>,<optio n> value to Function within Java Script
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Originally posted by chumma
    how can i pass the <select>,<optio n> value to Function within Java Script
    Depends on where you are calling the function from. If you call the function on submit of the from you may do something like

    [HTML]document.forms['formName'].selectName.opt ions[document.forms['formName'].selectName.sel ectedIndex].value[/HTML]

    to retrive the selected value

    Comment

    • acoder
      Recognized Expert MVP
      • Nov 2006
      • 16032

      #3
      Originally posted by chumma
      how can i pass the <select>,<optio n> value to Function within Java Script
      Show your code and what you are trying to do. You can call the onchange event handler to deal with changes in the selections of a select box.

      See this page and this one for more info.

      Comment

      Working...