Ooo to be honest, that is quite ugly Amlan...

Having a ton of code written to an inline handler is just bad form, it
would be much better to just delegate to an event handler, and even
better yet, hook into this event via Event.observe...


$("category").observe("change", handleChange);

You'll have a much easier time debugging via this approach.


--

http://positionabsolute.net




On Apr 20, 9:16 am, "Amlan<[email protected]>"
<[email protected]> wrote:
> I am using prototype.js for category and subcategy dropdown. On
> selecting category corrsesponding subcategories will be shown in
> another dropdown.
>
> <script type="text/javascript" src="js/prototype.js"></script>
>
> <select name="category" style="width:180px;"  onchange="new
> Ajax.Updater('subcc',
>                                                      'subCat.php?id=' + this
> [this.selectedIndex].value,
>                                                      {asynchronous:true, 
> evalScripts:true});">
> <option value=""></option>
> <option value=""></option>
> ----------------------
> </select>
>
> <span id="subcc">
>                          <select name="subCategory" id="subCategory" 
> style="width:
> 180px;">
>                          <option value="">Select Category</option>
>                          </select></span>
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to