OnLoad

Hey,

Can onload function grab get variable from the url passed?


window.onload = function() {
     AjaxRequest('main','./displaycontent.php?id=0');
}

Thanks

Can you provide more details on the situation that you have, and what you want to achieve?

This will probably give you what you need.
But, as Paul mentioned, with a bit more detail of your problem the many skilled experts here could help you devise one or many solutions(s).

Erm how to explain it…

I want to send a variable to the next page in the url… On the page it is sent to I have an onload function (as above) to populate a div set by calling a php script into it using ajax… The problem is that I cant capture the variable sent across the url to start with the correct record… in which the data will then be paginated in the div using ajax for the page loads…

Hope its making some sence

Cheers

Okay, you can use location.search to get the querystring, which in your situation may be “?id=12”


AjaxRequest('main','./displaycontent.php' + location.search);

Ahh… Sweet, thanks for that…