#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    13
    Rep Power
    0

    HTML and JavaScript


    Hi,

    I place JavaScript code in a file.
    I want to use it in an HTML file, but I don't know how to.

    Please help.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Location
    MD, USA
    Posts
    35
    Rep Power
    12
    place the javascript as script only (no <Script> tags in this file) and name it whatever.js

    Now, whenever you want to call that up, just type this in your html page:
    <Script Language="JavaScript" Src="whatever.js"></script>
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    13
    Rep Power
    0
    Yes, it works.

    Thanks Relster.

IMN logo majestic logo threadwatch logo seochat tools logo