PDA

View Full Version : how can I show the first value


this_is_me
06-24-2009, 07:04 AM
Hi,
how can I show the first dynamic value of the child dropdown list in the beginning?
I have a typical parent & child related dd menu which works fine as expected. The only flaw is when I start the page where the 2 dropdowns are situated, the second (child) always comes empty.
If I chose the second or any following entry from the first (parent) dd the corresponding child list appears as usual.

Is there a way to show the first corresponding child entry at startup?

Thanks for any hint

Ray Borduin
06-24-2009, 08:14 AM
Just copy the code you currently have applied onChange of the parent list and paste it to the onLoad event of the page so that the child list is populated when the page loads as if you made a change to the parent list.

xag
06-24-2009, 08:26 AM
ya but you can't put the onLoad even in the body tag if its locked by editable reagions! So which event should you attach it too on your page?

Ray Borduin
06-24-2009, 08:27 AM
no event... just add it to a script tag at the lowest point of the last editable region.

xag
06-24-2009, 08:27 AM
by the way office i posted a similar thread not too long ago http://www.webassist.com/forums/showthread.php?t=1352

xag
06-24-2009, 08:27 AM
ah I see got ya

this_is_me
06-24-2009, 08:52 AM
don't have the template problem, so the body onload is OK for me.
Thank you all for helping me out