Hi guys,

Is there any way to trigger a change event of select box in prototype/
javascript?

i have select box given below,
    <select id='designation_id' name='designation_id'>
        <option value=''>Select Designation...</option>
        <option value='1'>Lecturer</option>
        <option value='2'>Artist</option>
        ...
   </select>

Now i attached a change event to above select box as
   Event.observe("designation_id",  "change", function()
   {
         alert(this.value);
   });

Finally i tried to call change event of same select box in this way,
  <input id='btn1' onclick="javascript:$('designation_id').value='1';$
('designation_id').change();" />
But  It doest not work.

Please help me out...

--
With Regards
Amit Gharat
http://amitgharat.wordpress.com/

Not everyone can become a great programmer.
But a great programmer can come from anyone.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to