Skip to content Skip to sidebar Skip to footer

Ajax Triggering Body's Onload Event

My whole page is loading again whenever I make a ajax call to load a div. I have noticed that 'body onload=init()' onload event is getting triggered on ajax response and all the in

Solution 1:

It is not ajax that is triggering onLoad event of body. If you see the anchor tag, I haven't assigned any value to href="" which was causing the page to be loaded again. Removing it solved the problem.

Solution 2:

We'd need to see your code to help, but when pages do things like reloading etc, it usually means their is a script error. Use firebug to check for errors, it might be hard to catch if it's refreshing quickly.

Post a Comment for "Ajax Triggering Body's Onload Event"