[jQuery] Re: cascade question

2008-09-22 Thread Mike Nichols

Sorry I missed this.
I do the same thing ricardo recommended when unable to load the values
from the server on load.

On Sep 18, 12:23 pm, ricardobeat <[EMAIL PROTECTED]> wrote:
> oops, I didn't pay attention.
>
> You need to set the selected attribute and then fire the 'change'
> event on the parent  to which the 'cascade' funcionality is
> bounded by default.
>
> $('#first [value=B]').attr('selected','selected').parent().change()
>
> ricardo
>
> On Sep 18, 4:14 am, kevin <[EMAIL PROTECTED]> wrote:
>
> > Hi ricardo,
>
> > i tried this before,but set option attribute can only let first box
> > selected on "B"
> > it won't trigger second box get data from database.
> > second box won't change until you click on the first box and select
> > other options
>
> > all i want is first box selected on "B" and second box selected on
> > "B2" automatically when page loaded.
>
> > i still added  selected="selected"  on option "B".
> > here is the sample pagehttp://sskes.damimi.org/test/
>
> > thanks anyway.
>
> > On 9月18日, 上午6時32分, ricardobeat <[EMAIL PROTECTED]> wrote:
>
> > > You can do it via XHTML:
>
> > > B
>
> > > or add the attribute with jQuery:
>
> > > $('#first option:eq(2)').attr('selected','selected');
>
> > > ricardo
>
> > > On Sep 17, 10:50 am, kevin <[EMAIL PROTECTED]> wrote:
>
> > > > Hi all,
>
> > > > here is my sample page  http://sskes.damimi.org/test/
>
> > > > my question is how can i let the first box selected on "B" and also
> > > > trigger second box list the correct value
> > > > "B1","B2","B3,"B4" automatically when page loaded.
>
> > > > thanks.


[jQuery] Re: cascade question

2008-09-18 Thread ricardobeat

oops, I didn't pay attention.

You need to set the selected attribute and then fire the 'change'
event on the parent  to which the 'cascade' funcionality is
bounded by default.

$('#first [value=B]').attr('selected','selected').parent().change()

ricardo

On Sep 18, 4:14 am, kevin <[EMAIL PROTECTED]> wrote:
> Hi ricardo,
>
> i tried this before,but set option attribute can only let first box
> selected on "B"
> it won't trigger second box get data from database.
> second box won't change until you click on the first box and select
> other options
>
> all i want is first box selected on "B" and second box selected on
> "B2" automatically when page loaded.
>
> i still added  selected="selected"  on option "B".
> here is the sample pagehttp://sskes.damimi.org/test/
>
> thanks anyway.
>
> On 9月18日, 上午6時32分, ricardobeat <[EMAIL PROTECTED]> wrote:
>
> > You can do it via XHTML:
>
> > B
>
> > or add the attribute with jQuery:
>
> > $('#first option:eq(2)').attr('selected','selected');
>
> > ricardo
>
> > On Sep 17, 10:50 am, kevin <[EMAIL PROTECTED]> wrote:
>
> > > Hi all,
>
> > > here is my sample page  http://sskes.damimi.org/test/
>
> > > my question is how can i let the first box selected on "B" and also
> > > trigger second box list the correct value
> > > "B1","B2","B3,"B4" automatically when page loaded.
>
> > > thanks.


[jQuery] Re: cascade question

2008-09-18 Thread kevin

Hi ricardo,

i tried this before,but set option attribute can only let first box
selected on "B"
it won't trigger second box get data from database.
second box won't change until you click on the first box and select
other options

all i want is first box selected on "B" and second box selected on
"B2" automatically when page loaded.

i still added  selected="selected"  on option "B".
here is the sample page
http://sskes.damimi.org/test/

thanks anyway.

On 9月18日, 上午6時32分, ricardobeat <[EMAIL PROTECTED]> wrote:
> You can do it via XHTML:
>
> B
>
> or add the attribute with jQuery:
>
> $('#first option:eq(2)').attr('selected','selected');
>
> ricardo
>
> On Sep 17, 10:50 am, kevin <[EMAIL PROTECTED]> wrote:
>
> > Hi all,
>
> > here is my sample page  http://sskes.damimi.org/test/
>
> > my question is how can i let the first box selected on "B" and also
> > trigger second box list the correct value
> > "B1","B2","B3,"B4" automatically when page loaded.
>
> > thanks.


[jQuery] Re: cascade question

2008-09-18 Thread kevin

hi ricardo,

i tried this before,
this only can set the first box.
it won't trigger the second box to get data from database.
second box still empty.

i have added selected attribute on my sample page.
http://sskes.damimi.org/test/

thanks anyway.

On 9月18日, 上午6時32分, ricardobeat <[EMAIL PROTECTED]> wrote:
> You can do it via XHTML:
>
> B
>
> or add the attribute with jQuery:
>
> $('#first option:eq(2)').attr('selected','selected');
>
> ricardo
>
> On Sep 17, 10:50 am, kevin <[EMAIL PROTECTED]> wrote:
>
> > Hi all,
>
> > here is my sample page  http://sskes.damimi.org/test/
>
> > my question is how can i let the first box selected on "B" and also
> > trigger second box list the correct value
> > "B1","B2","B3,"B4" automatically when page loaded.
>
> > thanks.


[jQuery] Re: cascade question

2008-09-17 Thread ricardobeat

You can do it via XHTML:

B

or add the attribute with jQuery:

$('#first option:eq(2)').attr('selected','selected');

ricardo

On Sep 17, 10:50 am, kevin <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> here is my sample page  http://sskes.damimi.org/test/
>
> my question is how can i let the first box selected on "B" and also
> trigger second box list the correct value
> "B1","B2","B3,"B4" automatically when page loaded.
>
> thanks.