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
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to