I have a form with three drop down select boxes in it. I'd like the
second box to populate when an option is selected in the first, and
for the third to populate when an option is selected from the second.

In the first select box, I use onchange to call a php script:

<select id='box1' onchange="ajaxUpdater('ajax_regions', '/ajax/
populate.php?show=month&id=' + getsel('box1')">

  <select id="box2" onchange="ajaxUpdater('ajax_day', '/ajax/
populate.php?show=day&month=' + getsel('box2')">
      <div id='ajax_regions'></div>

, doesn't work, so I'm forced to use:

   <div id='ajax_regions'>
    <select id="box2">

, and get my php code to output something like:

   <select id='box2' onchange="ajaxUpdater('ajax_day', '/ajax/
populate.php?show=day&month=' + getsel('box2')">

Unfortunately, the onchange in the second select box doesn't fire. Is
this because it doesn't parse the javascript outputted by the php

Is there a way around this? Or perhaps a solution to the div inside
select problem?

Thanks in advance!

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 
For more options, visit this group at 

Reply via email to