load a .js file

K

kidsoftuk

Hi

I have a java script nav button bar where i preload images in each page
header. I do i reference .js file with the preload scrip. Below is what
i currently have


<SCRIPT LANGUAGE="JAVASCRIPT">
<!--
var image1 = new Image();
image1.src = "http://mydomain/buttons/home1.gif";
var image2 = new Image();
image2.src = "http://mydomain/buttons/home1a.gif";
var image3 = new Image();
image3.src = "http://maydomain/buttons/about1.gif";
var image4 = new Image();
image4.src = "http://maydomain/buttons/about1a.gif";
..
..
..
etc.


Regards

mark
 
M

McKirahan

kidsoftuk said:
Hi

I have a java script nav button bar where i preload images in each page
header. I do i reference .js file with the preload scrip. Below is what
i currently have


<SCRIPT LANGUAGE="JAVASCRIPT">
<!--
var image1 = new Image();
image1.src = "http://mydomain/buttons/home1.gif";
var image2 = new Image();
image2.src = "http://mydomain/buttons/home1a.gif";
var image3 = new Image();
image3.src = "http://maydomain/buttons/about1.gif";
var image4 = new Image();
image4.src = "http://maydomain/buttons/about1a.gif";
.
.
.
etc.


Regards

mark

Do you have a question?

Anyway, you should change lines:
<SCRIPT LANGUAGE="JAVASCRIPT">
<!--
and
-->
</SCRIPT>
to:
<script type="text/javascript">
and
</script>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top