Importing data on page transition.

Importing data on page transition.

Hi, I have one document containing multiple pages.  I also want to import an XML file (online) when a link to another page is called.

I am not sure what code to use when this link is used to populate the next page before it is shown.  I just want to have the loading message appear before the XML file is called and when the XML is loaded transition to the next page.

Currently I am using 'pagebeforehide'.

Thanks,
Lammie.