Hi Hans
Yes, getURL works asynchronously.
So, you must find a trick to delay execution until the datas are parsed.
What I suggest, is, for example, something like :
function getCars(evt,nameOfTheFunctionToCall)
{
getURL('http://localhost:8080/svg/Positions.jsp',
parseResponse('alertCars')));
}
function parseResponse(nameOfTheFunctionToCall)
{
//parse your data
...
//then, if OK
eval(nameOfTheFunctionToCall}
}
function alertCars()
{
alert("Cars " + printCars(cars));
//the rest of your treatment
...
}
Hope it helps
J�r�me
Hans M. Rupp wrote:
>Hallo!
>
>Is getURL working asynchronously?
>
>function getCars(evt) {
> getURL('http://localhost:8080/svg/Positions.jsp', parseResponse);
> alert("Cars " + printCars(cars));
> }
>
>parseResponse is a method which populates the cars Array.
>the alert shows me an empty Array
>however if I call the alert from within the parseResponse function it
>shows the expected result.
>
>If it works asychronously how can I synchronize?
>
>Thanks,
>
>Hans
>
>
>
>
>
>-----
>To unsubscribe send a message to: [EMAIL PROTECTED]
>-or-
>visit http://groups.yahoo.com/group/svg-developers and click "edit my
>membership"
>----
>Yahoo! Groups Links
>
>
>
>
>
>
>
>
>
--
J�r�me Tricand de la Goutte
Soci�t� Logatique
50 rue Marcel Dassault
92100 Boulogne-Billancourt
01 46 21 59 59
-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my
membership"
----
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/