Maximus Posted February 15, 2007 Share Posted February 15, 2007 I am currently doing a lot of work with AJAX based web applications, and I find it to be a real drag that you cannot use the "onLoad" event to call functions when loading sections of a page with AJAX. My problem is that I have to execute a piece of code as soon as the page is loaded (dynamically, using ajax). On normal sites, this would work with the onLoad property, so once the page has loaded, that event would trigger a JS function of my choice. But with AJAX, only a part of the site "refreshes/loads" so this event handler is useless. I have tried simply putting the function I want to execute upon loading in script tags like so: <script type="text/javascript"> loadContent('pagename', 'divname'); </script> but with no success :-( Does anyone know how to solve this problem? This is really important to me, and I would really appreciate any help, thanks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.