Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Aug 2002
    Location
    United Kingdom
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts

    help with linkin to js file ...

    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.

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    Cincinnati, OH
    Posts
    545
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Try adding - src="jsfile/". I think by just putting "jsfile" it will treat is as a filename not a dir.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •