Thanks a million Johannes, I had completely overlooked that.

Cheers

Paul

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Johannes
Nel
Sent: 07 December 2005 21:37
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Problem with xml loading a second time


u are recreating the xml object thus destroying the reference to the onLoad
function. try just doing another load call without all the other stuff

On 12/7/05, Paul Steven <[EMAIL PROTECTED]> wrote:
>
> Anyone have any idea about this one? I am still struggling to solve the
> problem:(
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Paul
> Steven
> Sent: 07 December 2005 09:01
> To: Flashcoders mailing list
> Subject: [Flashcoders] Problem with xml loading a second time
>
>
> Hi there
>
> I am loading in some xml to get the values for a Poll on my site. This
> works
> fine when the page first loads. However after someone has voted in the
> Poll
> I then want to read in the new values from the xml file.
>
> The code I have is as follows:
>
> pollData = new XML();
> pollData.ignoreWhite = true;
> pollData.load("xml/movies_poll.xml?uniqueID=" + getTimer());
>
>
>
> pollData.onLoad = function(success){
>
>         trace("XML file loaded");
>
>         if(success){
>                 // my code goes in here
>         } else {
>                 trace("XML file could not be loaded");
>         }
>
> }
>
> As I said, this works fine when I first load the page.
>
> After a vote I then call the following function
>
> Get_Poll_Data();
>
> i.e
>
> function Get_Poll_Data() {
>
>         trace ("Get Poll Data");
>
>         //load in XML
>         pollData = new XML();
>         pollData.ignoreWhite = true;
>         pollData.load("xml/movies_poll.xml?uniqueID=" + getTimer());
>
>
> };
>
> However it is not reloading the xml file again and I have no idea why not.
> It does not appear to be calling the .onLoad function the second time
>
> Any help much appreciated.
>
> Thanks
>
> Paul
>
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>



--
j:pn
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to