Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Linking to 'external.js' file

  • 29-07-2005 11:25am
    #1
    Registered Users, Registered Users 2 Posts: 632 ✭✭✭


    Hi, I'm not too familiar with javascript but I just downloaded a free script for a scrolling marquee and placed it into a div in my html. It works great, I was even able to style it using my linked external css file.

    I though I might be able to save the script in an external file and place a link to it from within the div. Reason is, it will be on every page of the site and I want to be able to update the content easily.

    I tried the following;

    <script type="text/javascript" language="javascript" src="(../path/to/ file.js)"></script>

    but no joy :(

    Am I doing something wrong here? Thanks.


Comments

  • Registered Users, Registered Users 2 Posts: 3,890 ✭✭✭cgarvey


    you might want to copy it to the same folder as the HTML file that's calling it, to eliminate path (virutal or OS) issues, as a starting point, then use your script tag
    <script type="text/javascript" src="myjsfile.js"></script>
    

    If that still doesn't work, try loading the JS file in your browser directly (as in, in the address bar type http://whatever/myfolderwithHTMLfile/myjsfile.js) to make sure it can be read.

    .cg


  • Registered Users, Registered Users 2 Posts: 632 ✭✭✭ButtermilkJack


    Hey cgarvey, thanks for the quick reply! I tried the first option, placing the js file in the same folder and no joy. I'm now trying to upload the js to the server to try your second suggestion but I'm having problems connecting to server through dreamweaver.

    I just installed bb modem and wireless router so I think it could be a firewall issue. I'm useless at those so it could be a while before you hear from me :o

    Thanks so far :D


Advertisement