Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Script tag not supported in current browsers

  1. #1
    Join Date
    Aug 2007
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Script tag not supported in current browsers

    1) Script Title: Tabs Menu (mouseover)

    2) Script URL (on DD): http://dynamicdrive.com/dynamicindex1/tabmouseover.htm

    3) Describe problem:
    This script uses <layer> and <ilayer>. From what I've been able to gather, these two tags are no longer supported by any current browsers. However, the script advertises that it works with "FF1+ IE5+ Opr7+". This seems misleading, at the least. If someone could shed some additional light on this, I would appreciate it! Thanks!

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    That tag was used to give backward compatibility to NN4 type browsers. It will not prevent the script from working in modern browsers.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Aug 2007
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for your input...that helps to explain things. Could I just take out the <layer> and <ilayer> statements? I've got the page coded both with a XHTML 1.0 Transitional and HTML 4.01 Transitional doctype. Should either of those work with this script? Thanks again for your help!

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Yes. You'd lose NN4 support, but hey, no-one cares about NN4
    I've got the page coded both with a XHTML 1.0 Transitional and HTML 4.01 Transitional doctype. Should either of those work with this script?
    It'll be valid HTML 4.01 Transitional if you remove the <layer> and <ilayer> and put the script in an external file. However, I strongly suggest you use HTML 4.01 Strict. There's really no reason to still be using either of the Transitional DOCTYPEs on the Web of today. XHTML should be avoided because IE doesn't support it yet.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Yes you can remove it, but there really is no need to unless you just can't sleep at night without passing the validator robot.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #6
    Join Date
    Aug 2007
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Not only was the validator failing, but the latest version of IE was giving me an error on the <layer> statements during runtime. I took them out and the error went away. Thank you both for your input. It really helped me out a great deal!

  7. #7
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by mabel_minn View Post
    IE was giving me an error on the <layer> statements during runtime. I took them out and the error went away. Thank you both for your input. It really helped me out a great deal!
    Mmm, not on the demo page though. I'm thinking that there must be something else going on with the page to do that. IE shouldn't even try to execute any layer statements unless you altered the script or have another that changes the meaning of some of the branching tests involved, something like that.

    As Twey says though, it really isn't crucial to support NN4 any longer, except in special situations.

    Oh, and you are welcome.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  8. #8
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    It's browser detection, it's not hugely reliable.
    Yes you can remove it, but there really is no need to unless you just can't sleep at night without passing the validator robot.
    Well I for one like to know that my code is actually HTML
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  9. #9
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by Twey View Post
    Well I for one like to know that my code is actually HTML
    I know that what I write is HTML, at least in some century.

    Anyways, we weren't discussing what you or I write, but what was written by someone else. No matter whatever else you may want to call it, it was HTML code at the time, and pretty darn serviceable HTML code at that, having stood the test of time so far.

    I'm thinking that the error in IE reported by mabel_minn must have more behind it than has so far been let on.

    Oh, and I agree, the browser detection of some of these older scripts is, at best, outmoded. But that has nothing to do with the HTML code. There is a thin line here with this script though, the 'detection' could be seen as feature branching and was quite good (whatever it is) for its day.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  10. #10
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    No matter whatever else you may want to call it, it was HTML code at the time, and pretty darn serviceable HTML code at that, having stood the test of time so far.
    Agreed. A decade or so on, though, Web technologies have changed somewhat.
    the 'detection' could be seen as feature branching and was quite good (whatever it is) for its day.
    Not really. You're right in saying that it was good compared to the majority of scripts in its day, but at the same time all the language features necessary for doing proper feature detection were there and could have been put to use. It's because of scripts like this one that DD has a bad reputation amongst experienced web developers.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

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
  •