oops, I didn't pay attention. You need to set the selected attribute and then fire the 'change' event on the parent <select> 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: > > > <option value="B" selected="selected">B</option> > > > 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.