Hello and thanks for the reply

I'm trying to use the solution you propose, but I'm new to jquery and
I can't make it work.

My code is:


jQuery(document).ready(function()
                {
                        jQuery("#chained_child").cascade("#chained",{
                                list: list1,
                                template: commonTemplate,
                                match: commonMatch
                        });
                        jQuery("#chained_sub_child").cascade("#chained_child",{
                                list: list2,
                                template: commonTemplate,
                                match: commonMatch
                        });
                        jQuery("#chained_sub_child1").cascade("#chained_child",{
                                list: list3,
                                template: commonTemplate,
                                match: commonMatch
                        });
                });



        </script>

        <script type="text/javascript">
         function startDrops() {
           $('#chained [value=2').attr('selected','selected').parent().change
();
           $('select#parent').trigger('cascade');
           $('#chained_child [value=3').attr('selected','selected').parent
().change();

         }
</head>
<body onload="Javascript:startDrops();">
...

I tried also:
$('select#chained').trigger('cascade');

and several variations...

But it didn't work. :(

Can you help me?

Thanks



On 11 Nov, 02:06, Mike Nichols <nichols.mik...@gmail.com> wrote:
> $('select#parent').trigger('cascade');
> ?
>
> On Nov 9, 5:08 pm, rmachado <rmachado...@gmail.com> wrote:
>
> > Hello to all
>
> > I using thecascadeplugin in 3 dropdowns and it works fine, but in
> > some ocasions I need to pre selected the values because the user is
> > editing the previous recorded selections.
>
> > I manage to selected the value of the first dropdown with the
> > following code:
> > $('#chained [value=1').attr('selected','selected').parent().change();
>
> > but how can I selected the second one and the third?
>
> > I tried this:
> > <script type="text/javascript">
> >          function startDrops() {
> >            $('#chained 
> > [value=1]').attr('selected','selected').parent().change
> > ();
> >            $('#chained_child [value=3]').attr('selected','selected').parent
> > ().change();
> >          }
>
> >         </script>
> > ...
> > <body onload="Javascript:startDrops();">
>
> > But it didn't work..
>
> > How can I do it?
>
> > Thanks

Reply via email to