SitePoint Sponsor

User Tag List

Results 1 to 12 of 12
  1. #1
    SitePoint Addict
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    330
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Proper tag for Javascript?

    If you goto www.bluevolume.com and view the source you'll see that there is some javascript in there to open a popup window. The opening tag in the code is:
    Code:
    <script language="JavaScript">
    When I load this page in Dreamweaver and check for errors, it says:

    "Tag SCRIPT is missing required attribute type [Mozilla 1.0, Netscape Navigator 7.0]"

    How would I fix this Javascript tag to get rid of the error?

  2. #2
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,236
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    <script type="text/javascript"> is the standards-compliant way to do it. If you need compatibility with older browsers, you can use this instead:
    Code:
    <script language="javascript" type="text/javascript">

  3. #3
    SitePoint Addict
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    330
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, I no longer get the error, however, if the 'type' attribute is the standards-compiant way to code, then why do I get this warning?:
    "The Type attribute of the link tag is not supported. [Opera 7.0]"

    for this line of code:
    Code:
    <link href="main.css" rel="stylesheet" type="text/css">
    When I remove the Type attribute, the warning goes away and I get no further warnings from mozilla, netscape or IE 5+. Is is just Opera that isn't standards-compliant?

  4. #4
    because you gotta have beer! firegryphon3207's Avatar
    Join Date
    Apr 2000
    Location
    Roxbury/Boston
    Posts
    479
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by tempus
    Thanks, I no longer get the error, however, if the 'type' attribute is the standards-compiant way to code, then why do I get this warning?:
    "The Type attribute of the link tag is not supported. [Opera 7.0]"

    for this line of code:
    Code:
    <link href="main.css" rel="stylesheet" type="text/css">
    When I remove the Type attribute, the warning goes away and I get no further warnings from mozilla, netscape or IE 5+. Is is just Opera that isn't standards-compliant?
    I don't know, I use v.7.11, and I have the style sheet from my website the same way (different order but same items) and I have no trouble.
    Alone we can do so little; together we can do so much.
    -----------------------------------------------------
    tinyplanet.org <--a nifty spot.

  5. #5
    SitePoint Wizard silver trophy Crazybanana's Avatar
    Join Date
    Mar 2003
    Location
    In tha fruit cellar
    Posts
    1,379
    Mentioned
    32 Post(s)
    Tagged
    1 Thread(s)
    <link rel="stylesheet" type="text/css" href="main.css" />


    try this, I dunno why you get the error... try with the closing tag... you have it in the head i suppose...?
    Who's to doom when the judge himself is dragged before the bar


    Home | Web | Facebook

  6. #6
    because you gotta have beer! firegryphon3207's Avatar
    Join Date
    Apr 2000
    Location
    Roxbury/Boston
    Posts
    479
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Crazybanana
    <link rel="stylesheet" type="text/css" href="main.css" />


    try this, I dunno why you get the error... try with the closing tag... you have it in the head i suppose...?
    I think it is the order, perhaps the "rel=" has to come after the link? I've never done it without the "rel=" right after the link.....
    Alone we can do so little; together we can do so much.
    -----------------------------------------------------
    tinyplanet.org <--a nifty spot.

  7. #7
    SitePoint Addict
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    330
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nope...even with the changed order it still gives me the warning...and it is contained in the head of the document.

  8. #8
    because you gotta have beer! firegryphon3207's Avatar
    Join Date
    Apr 2000
    Location
    Roxbury/Boston
    Posts
    479
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    maybe it's time to upgrade.
    Alone we can do so little; together we can do so much.
    -----------------------------------------------------
    tinyplanet.org <--a nifty spot.

  9. #9
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,236
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by tempus
    Thanks, I no longer get the error, however, if the 'type' attribute is the standards-compiant way to code, then why do I get this warning?:
    "The Type attribute of the link tag is not supported. [Opera 7.0]"

    for this line of code:
    Code:
    <link href="main.css" rel="stylesheet" type="text/css">
    When I remove the Type attribute, the warning goes away and I get no further warnings from mozilla, netscape or IE 5+. Is is just Opera that isn't standards-compliant?
    I'm going to go out on a limb and say that you're developing in DWMX 2004. If you are, then don't worry about these browser errors, since most of them can be safely ignored. Instead, worry more about validation to standards, not browsers. If a browser doesn't support a tag or attribute, chances are that it will in a near-future release anyway.

  10. #10
    Ensure you finish what you sta bronze trophy John Colby's Avatar
    Join Date
    Aug 2003
    Location
    University of Central England, U.K.
    Posts
    487
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by vgarcia
    If a browser doesn't support a tag or attribute, chances are that it will in a near-future release anyway.
    <cynic>
    Except if it's IE
    </cynic>
    John
    No electrons were harmed during the creation, transmission
    or reading of this posting. However, many were excited and
    some may have enjoyed the experience.

  11. #11
    because you gotta have beer! firegryphon3207's Avatar
    Join Date
    Apr 2000
    Location
    Roxbury/Boston
    Posts
    479
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by vgarcia
    I'm going to go out on a limb and say that you're developing in DWMX 2004. If you are, then don't worry about these browser errors, since most of them can be safely ignored. Instead, worry more about validation to standards, not browsers. If a browser doesn't support a tag or attribute, chances are that it will in a near-future release anyway.
    Off Topic:

    congrats to getting your site finished - It's looking good.
    Alone we can do so little; together we can do so much.
    -----------------------------------------------------
    tinyplanet.org <--a nifty spot.

  12. #12
    SitePoint Addict
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    330
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by John Colby
    <cynic>
    Except if it's IE
    </cynic>
    so true...


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
  •