PDA

View Full Version : loading dynamic data into scrollpane component


kamunki
04-10-2006, 07:56 PM
hi guys and gals

in a site i'm working on i use a lot ov dynamic text loaded via .asp pages. i've recently switched some ov the text boxes to scrollpane components. this kinda works okay except that the text is often not loaded into the scrollpane component on first attempt (i.e. the button has to be pressed twice, the page must be loaded twice etc.)

any smart ideas about how i can force the dynamic text to be displayed first time round?

thanx, kamunki

mcmcom
04-10-2006, 07:58 PM
how are you loading? LoadVars?

you should make sure the loading is completed before displaying it.
ie :

LoadVars.onLoad = function(){
if(!Success){
//try again
}else{
//bind to scrollpane
}
[/AS]

hth,
mcm

kamunki
04-10-2006, 08:16 PM
thanx for that - i'll give it a shot

mcmcom
04-10-2006, 08:20 PM
the bottom line is you should always make sure that the load event has completely fired before you bind the data. LoadVars onLoad function is not supposed to fire before it completes, but it's flaky. So its always good to check and make sure its loaded completely.

Look in the Actionscript Dictionary on macromedia.com for more info about the LoadVars object and how to determine if its indeed loaded.

mcm