PDA

View Full Version : fixing 2 scripts that dont work with each other


yof3f
04-27-2003, 10:24 AM
oK! well im new here, but i've looked at the tutorial about adding more than one javascript to a page.
i understand the common problem, of there being

SCRIPT 1: window.onload=dothis
SCRIPT 2: window.onload=dothat

therefore not showing both scripts.
RESOLUTION is: <body onload="dothis();dothat()">


but what if the problem is this:
SCRIPT 1: window.onload=dothis
SCRIPT 2: if (opera || ie || dom) window.onload = dothat

what would the resolution be? it would be greatly appreciated if someone could help :)

liorean
04-27-2003, 11:06 AM
window.onload=function(){
dothis();
(opera||ie||dom)&&
dothat();
}

yof3f
04-27-2003, 12:30 PM
hrmm.. when i try that theres still a runtime error 0_o
thanks for helpin tho!