Which input triggered onChange

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • brian.gaber@pwgsc.gc.ca

    Which input triggered onChange

    I have a table inside a form and each row of the table has a similar
    <SELECT ... statement, only the name and id is different.

    Here is one example:

    <select name="status11" onchange="statu s_OnChange()" id="status11">

    <option selected="selec ted" value="Active"> Active</option>
    <option value="Correcti on">Correctio n</option>
    <option value="Audit">A udit</option>
    <option value="Hold">Ho ld</option>
    <option value="Complete ">Complete</option>

    How can I determine which <SELECT ... triggered the onchange?
  • Bart Van der Donck

    #2
    Re: Which input triggered onChange

    brian.ga...@pwg sc.gc.ca wrote:
    <select name="status11" onchange="statu s_OnChange()" id="status11">
    >
    <option selected="selec ted" value="Active"> Active</option>
    <option value="Correcti on">Correctio n</option>
    <option value="Audit">A udit</option>
    <option value="Hold">Ho ld</option>
    <option value="Complete ">Complete</option>
    >
    How can I determine which <SELECT ... triggered the onchange?
    <select onchange="alert (this.value)" size="1"
    name="status11" id="status11">

    --
    Bart

    Comment

    • Bart Van der Donck

      #3
      Re: Which input triggered onChange

      Bart Van der Donck wrote:
         <select onchange="alert (this.value)" size="1"
          name="status11" id="status11">
      Rereading the original question. My solution would be for the
      triggered option, not for the select.

      --
      Bart

      Comment

      Working...