PDA

View Full Version : cant link js from external file



Josh404
10-30-2008, 07:58 AM
i am working on a simple gallery with an image array to use on multiple project pages.

see example: http://uoregon.edu/~josh/gallery/

i can get the javascript to work if i place it all in the document head. however, the idea was to have it as one external file i could link to from all the project files.

can anyone help?

thanks.

tfit
10-30-2008, 08:12 AM
Have a look here:http://www.w3schools.com/js/js_whereto.asp

rangana
10-30-2008, 08:17 AM
remove the script tags and the comments inside your gallery.js:


<SCRIPT LANGUAGE="JavaScript">
<!--
.
.
.
//-->
</SCRIPT>