I don\'t seem to be able to get the body onload=\"...\" event to fire in Safari when the page is entered via the back button. It works fine in FF and IE. Is there a Javascript
Rather than using the onload
attribute of the tag, you could instead try using the DOM ready event with jQuery, like so:
$(document).ready(function() {
// your code here
});
Or, the shorthand version:
$(function() {
// your code here
});
Even if this doesn't solve your issue with Safari, it's still a good practice in general because it separates your HTML and Javascript into easily discernible parts.