i have a main.jsp file whose <body onload="doSomething()"> works perfectly on its own.
however, if i instead call AAA.jsp which includes/embeds 2 jsp files (main.jsp and menu.jsp), the onload of main.jsp no longer works. i suspect it is because AAA.jsp also has its own onload function and for some reason this keeps main.jsp's onload from executing.
my questions:
- would there be any other reasons i should watch out for why the 2nd onload is not
working? perhaps my initial assumption is wrong and something else is the problem.
- i don't have edit access to AAA.jsp so i cant just move both onloads onto
main.jsp. besides, there are other files dependent on AAA.jsp so editing it
wouldnt be a good idea. that being said, would there be another way i can simulate
the onload function without duplicating the <body onload=""> tag?
thanks.
however, if i instead call AAA.jsp which includes/embeds 2 jsp files (main.jsp and menu.jsp), the onload of main.jsp no longer works. i suspect it is because AAA.jsp also has its own onload function and for some reason this keeps main.jsp's onload from executing.
my questions:
- would there be any other reasons i should watch out for why the 2nd onload is not
working? perhaps my initial assumption is wrong and something else is the problem.
- i don't have edit access to AAA.jsp so i cant just move both onloads onto
main.jsp. besides, there are other files dependent on AAA.jsp so editing it
wouldnt be a good idea. that being said, would there be another way i can simulate
the onload function without duplicating the <body onload=""> tag?
thanks.