SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: js source file

  1. #1
    SitePoint Enthusiast
    Join Date
    Apr 2002
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    js source file

    i have just started to create a global js source file and i was wondering how i could include a global copyright tag.

    i.e

    http://northerndescent.wired-hub.net/temp/test.html

    the random image use (on page refresh) can be printed to display "img/img1.jpg img/img3.jpg "

    i was wondering if anyone knows how to declare stuff in the source file like

    var copyright= copyright team nd 2003

    and the in the pages

    <script language="JavaScript">
    document.writeln('<TD'+'>'+copyright+'<'+'/TD>');
    </script>


    ^ i know the above doesn't work but i have a limted knowledge of js as i am learning it as i go along.

    i hope i made sense

  2. #2
    SitePoint Wizard DougBTX's Avatar
    Join Date
    Nov 2001
    Location
    Bath, UK
    Posts
    2,498
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This works for me:

    Code:
    <script language="JavaScript" type='text/javascript'>
    var copyright = 'copyright team nd 2003';
    document.writeln('<td>'+copyright+'</td>');
    </script>
    Douglas
    Hello World

  3. #3
    SitePoint Enthusiast
    Join Date
    Apr 2002
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    it worked

    thanks doug


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
  •