SyntaxFix
Write A Post
Hire A Developer
Questions
You can use jQuery to do that for you.
$(document).ready(function() { // put Ajax here. });
Check it here:
http://docs.jquery.com/Tutorials:Introducing_%24%28document%29.ready%28%29