1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to put a script into an external file

Discussion in 'JavaScript' started by tayiper, May 10, 2006.

  1. #1
    Hey all, sorry if this was already discussed. Also, I know that there are numerous sources available on the Internet about this, but I would like to know exactly how should I implement it in my particular case ...


    Anyway, I am interested in a general and easy "technique" to put my "OPEN or GET" drop-down menu script (it's a JavaScript) into an external file. See this script on any of my "root-main" pages, for instance see my home-site's intro.html page.


    Is this as easy as referring to my "marquee" script with the following code (see my site's index.html page):
    <script type="text/javascript" src="http://users.volja.net/tayiper/script/marquee.js"></script>
    Code (markup):
    But then again, how exactly should I implement it in my particular case ??


    P.S. -- Originally I've used the "marquee" tags, but that was not valid by W3C, then I posted a Is there a valid equivalent to marquee tag (by W3C recommendations) ?? thread in the Programmer's Symposium section of Ars Technica forums, where one user suggested to use this script instead. However, the script itself was also not W3C-valid, so I finally rather moved it to an external file.


    tayiper
     
    tayiper, May 10, 2006 IP