On Jan 22, 2:57 pm, yves coor <[EMAIL PROTECTED]> wrote:
> I don't think I am but maybe I'm judging this wrongly.
> I call two functions:
>
> readXml(...);
> displayPlayer(...);
>
> The second one uses the global var myarray but it's always undefined.
I think that that's where the asynchronous
I don't think I am but maybe I'm judging this wrongly.
I call two functions:
readXml(...);
displayPlayer(...);
The second one uses the global var myarray but it's always undefined.
It must definitely be related to the timing of the asynchronous call
though. If I pass the values returned by the
also If you do something like this (don't know if you do):
var myarray = new Array();
function readXml(){ ..ajax.. }
function handleXML(xml) { myarray[i] == ...}
var x = myarray.length;
then x will always be 0 because myarray.length get's executed before
the ajax call returns success (async
why not:
var myarray = new Array();
function handleXML(xml) {
$(xml).find("something somethingelse").each(function(){
myarray.push( $(this).text());
});
Can't see why that wouldn't work.
David
http://OntologyOnline.org
On Jan 22, 11:53 am, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]>
4 matches
Mail list logo