SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: Im an idiot

  1. #1
    SitePoint Addict
    Join Date
    Dec 2001
    Posts
    395
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Im an idiot

    I cant remember how to call a javascript in my source. I want to put it in my html code but i cant remember how to do it. I dont want all 30 lines of code there. plz help

  2. #2
    SitePoint Evangelist
    Join Date
    Jan 2002
    Posts
    420
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    do you mean link to an external javascript file??

    if so

    <script language="JavaScript" type="text/JavaScript" src="YOURFILE.js"></script>
    Wavelan

  3. #3
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you cannt put your code inside <script></script> whilst using <script src=""></script>

  4. #4
    long gone but not forgotten AljapaCo's Avatar
    Join Date
    Aug 2001
    Location
    Sweden
    Posts
    548
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Andrew-J2000
    you cannt put your code inside <script></script> whilst using <script src=""></script>
    hmm, I use it with <script src=""... />

    Itīs just plain xhtml to close the container...
    T O B I A S - S T R A N D H | visit my site here
    OPERA7 /MSIE6 /FireFox 1.1/Win2000 /ADSL /17" Screen /1024x768
    god doesn't create genius, he clones me.............

  5. #5
    The doctor is in... silver trophy MarcusJT's Avatar
    Join Date
    Jan 2002
    Location
    London
    Posts
    3,509
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes that is correct for empty elements, but older browsers might not realise that the <SCRIPT> element has closed unless you add the closing </SCRIPT> instead.


    M@rco


Bookmarks

Posting Permissions

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