collecting 2 values and sending them to a function.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MOzgaf
    New Member
    • Dec 2010
    • 13

    collecting 2 values and sending them to a function.

    hi
    I forgot how to do this and how it is called.
    basically i wan to send 2 values from 2 different select tag to a submit button .
    eg.

    Code:
     Name1<SELECT  NAME="first_list" >
    <Option value="1" >Name 1</option>
    <Option value="2" >Name 2</option>
    </SELECT>
    <br /><br />
     Name2<SELECT  NAME="second_list" >
    <Option value="1" >Name 1</option>
    <Option value="2" >Name 2</option>
    </SELECT>
    <input type="submit" value="Submit" onchange="showUser(first_list.value,second_list.value)"
    I don't remember how to call that select option value and send it to a Java function.so that value 1 from first name option is sent and 2 from second name option is sent as well ,just as an example.
  • drhowarddrfine
    Recognized Expert Expert
    • Sep 2006
    • 7434

    #2
    Select options can't be called and HTML can't send anything to a Java function so I'm not sure what to make of your question.

    Comment

    • MOzgaf
      New Member
      • Dec 2010
      • 13

      #3
      Am sorry I didn't mean call as a html thing.but i want to send the value to a function then the select onchange="SOMEf unction()". this way when he drop list changes the new value is sent to this function.I am looking for a way to send 2 select values instead of just one like this.so i was thinking to use the submit button and 'call/name' which value i want to send.
      thank you for your interest.

      Comment

      • drhowarddrfine
        Recognized Expert Expert
        • Sep 2006
        • 7434

        #4
        The only way to do what you want is with javascript, which is not java, but that's a different board. You need to ask there.

        Comment

        Working...