PDA

View Full Version : onLoad event not firing


pthompson2002
09-17-2002, 04:09 PM
I am having trouble with the onload event in the <body> When a new page is loaded in the center frame I want the menu frame to reload. I know the code I'm using is correct as I have tested it with onclick events and it works, but the onload event does not fire it. I even tested to see if onResize worked and it did. The code I'm using is


function reload_toc()
parent.frames["toc"].location.href="fcont_toc.asp"
}
{

anyone know of any alternatives that produce the same result, preferably without using onLoad. Using onclick on each link is not an option

beetle
09-17-2002, 05:34 PM
Why not track each click? You don't need to attach the onClick event to every link.document.onclick = function() {
var o = event.srcElement;
if (o.tagName == "A" || (o.tagName == "IMG" && o.parentNode.tagName == "A"))
parent.frames["toc"].location.href="fcont_toc.asp"
}