PDA

View Full Version : Conflicting Javascript


Angela
12-16-2002, 04:09 PM
I am trying to run two javascripts on the same page. I believe there is simply an onload conflict. However, one of the scripts is an external .js file that I am calling. I have an onload param set in the body as follows:

<body bgcolor="#202763" style="margin-left: 0; margin-top: 0" link="#FFFFFF"
vlink="#FFFFFF" alink="#FFFFFF" onload="dothis();">

for the function that is internal to the page.

However, can I call the .js file in the same onload statement? If so, how do I do this?

Currently I am calling the external script at the end of the page as follows:

<script type="text/javascript" language="javascript1.2"
src="resources/menu.js"></script>
</body>
</html>

Any thoughts?
Thanks.

joeframbach
12-16-2002, 04:20 PM
well, when the .js loads, it sorta puts itself onto the page. you dont 'call' a function from an external .js or anything like that.
put the <script src...> into the <head>, and it'll do the rest.

cg9com
12-16-2002, 05:15 PM
onload="dothis(); dothat()"

im pretty sure that will work