I just updated the demo page at http://dev.chayachronicles.com/jquery/cascade/

At the bottom is an example of siblings being registered that are
within containers within a table.
The selectors could be cleaned up but it works for now...have a look
and let me know how that works for you.
One thing I'd point out is that you are using the same id multiple
times which is invalid html so that will choke any jquery selectors.
I'd recommend selecting by class in your markup instead of ids.
mike

On Aug 20, 12:46 am, pervak <[EMAIL PROTECTED]> wrote:
> Sorry I mean
>
> jQuery("div#resort_select select",this).cascade("div#country_sel
> select",{
>
> and
>
> jQuery("div#resort_select select",this).cascade(this,"div#country_sel
> select",{
>
> On Aug 19, 7:38 pm, Mike Nichols <[EMAIL PROTECTED]> wrote:
>
> > what is "div#kurort_select "?
> > I can't find that in your markup.
>
> > On Aug 19, 5:58 am, pervak <[EMAIL PROTECTED]> wrote:
>
> > > Hi all!
>
> > >  I've tried to usecascadeplugin from Mike Nichols and everything
> > > goes fine until i need to adjust it for the several dropdowns.
>
> > > [code]
> > > <td class="tdg" id="a_g_s">
>
> > >         <div class="all_geo_select">
> > >             <div id="country_sel">
> > >             Country<br />
> > > <select name="country_id[]">
> > > <option value="0">Select the country</option>
> > > <option value="1">Austria</option>
> > > <option value="2">Bali</option>
> > > </select>
> > >             </div>
>
> > >             <div id="resort_select">
> > >             Resort<br />
> > > <select name="resort_id[]">
> > > <option value="0">Select resort</option>
> > > <option value="4">Bad Blumau</option>
> > > </select>
> > >                 </div>
>
> > >         </div>    <!-- all geo 1 -->
>
> > >  <div class="all_geo_select">
> > >             <div id="country_sel">
> > >             Country<br />
> > > <select name="country_id[]">
> > > <option value="0">Select the country</option>
> > > <option value="1">Austria</option>
> > > <option value="2">Bali</option>
> > > </select>
> > >             </div>
>
> > >             <div id="resort_select">
> > >             Resort<br />
> > > <select name="resort_id[]">
> > > <option value="0">Select resort</option>
> > > <option value="4">Bad Blumau</option>
> > > </select>
> > >                 </div>
>
> > >         </div>    <!-- all geo 2 -->
> > > </td>
> > > [/code]
>
> > > I need that each Country drop down affects only on it's Resort drop
> > > down.
>
> > > I write this code:
>
> > > jQuery(document).ready(function() {
> > >         jQuery("td#a_g_s div.all_geo_select").each(function(i){
>
> > >         jQuery("div#kurort_select select",this).cascade("div#country_sel
> > > select",{
> > >                                                         ajax: {
> > >                                                                 url: 
> > > 'countries_ajax.js',
> > >                                                                 data: { 
> > > myotherdata: jQuery("#ajax_header").html() }
> > >                                                         },
> > >                                                         template: 
> > > commonTemplate,
> > >                                                         match: commonMatch
> > >                 });
>
> > >     }); // each
>
> > > });
>
> > > When I change the first div's Country it affects on both Resort drop
> > > downs (but changing the second div's Country affects nothing!).
>
> > > If I write
>
> > > jQuery("div#kurort_select select",this).cascade(this,"div#country_sel
> > > select",{
>
> > > It affects on each drop down but the options become empty.
>
> > > Help please to say THIS tocascadeplugin.
>
> > > Thanks in advance, Alexander.

Reply via email to