www.webdeveloper.com
Results 1 to 5 of 5

Thread: miltiple scripts....

  1. #1
    Join Date
    Dec 2005
    Posts
    2

    Unhappy miltiple scripts....

    hey im pretty new at making web pages... so this might sound a little obvios... but i was wondering if it is even possible to have multiple scripts on the same page... whenever i put one script at the bottom the other one stops moving... thanks for your time

  2. #2
    Join Date
    Oct 2003
    Location
    Andover, UK
    Posts
    945
    "Stops moving?"

    Yes you can. All of the following are valid:

    -----------------------------------------

    <script language=javascript type=text/javascript>

    function function1() {
    //some code
    }

    function function2() {
    //some code
    }

    </script>

    -----------------------------------------

    <script language=javascript type=text/javascript>
    function function1() {
    //some code
    }
    </script>

    <script language=javascript type=text/javascript>
    function function2() {
    //some code
    }
    </script>

    -----------------------------------------

    <script src=myScript.js language=javascript type=text/javascript></script>

    <script language=javascript type=text/javascript>
    function function1() {
    //some code
    }
    </script>

  3. #3
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    Quote Originally Posted by mitya
    All of the following are valid:
    Actually, none of those are:

    1) The "language" attribute has been depricated.

    2) While it is true that you can omit quotation marks around attribute values in certain cases, when there is a "/" in the value you need the quotation marks.
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  4. #4
    Join Date
    Oct 2003
    Location
    Andover, UK
    Posts
    945
    OK, so...

    1) The coding wasn't textbook.
    2) But they will all work fine.

  5. #5
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    Number 2) is actually a big deal.
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles