View Full Version : help with linkin to js file ...

08-06-2002, 02:50 PM
Hello everyone,
I know you can link to a javascript file by doing the following :
<script src="jsfile.js" language="javascript" type="text/javascript"></script>
but i want to know how to link to a js file without adding the ".js" at the end. So i can write :
<script src="jsfile" language="javascript" type="text/javascript"></script>
I know this is possible but i do not know how to do it. Can anyone help ?
I've tried creating a dir named "jsfile" & then creating a file named index.html, index.txt, index.js
but none have worked.
Help !
Bye the way am just curious of how its done.

08-06-2002, 02:56 PM
Try adding - src="jsfile/". I think by just putting "jsfile" it will treat is as a filename not a dir.