homepage Welcome to WebmasterWorld Guest from 54.167.144.202
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
IFRAMES and NS4
shortest sniffer code
rcjordan

WebmasterWorld Senior Member rcjordan us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 383 posted 9:12 pm on Mar 6, 2001 (gmt 0)

With the roll-out of NS6, IFRAMES will rapidly overtake LAYERS and ILAYERS for handling some cross-browser coding, but we may have a legacy issue with NS4 browsers for some time to come. Does anyone have the js code for sniffing NS4 only, with everything else being the default?

 

David

10+ Year Member



 
Msg#: 383 posted 9:31 pm on Mar 6, 2001 (gmt 0)

I think you can just do
If (document.layers){

}
I am sure there is another way

rcjordan

WebmasterWorld Senior Member rcjordan us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 383 posted 9:35 pm on Mar 6, 2001 (gmt 0)

Thanks David, I should have added:

I'm going to inject banner rotation using ILAYERS into pages being served to NS4, everything else gets an IFRAME. I'm currently testing for every browser under the sun and no longer see the need. I could drop 20k or more of js by just testing for NS4.

David

10+ Year Member



 
Msg#: 383 posted 9:45 pm on Mar 6, 2001 (gmt 0)

I am grabbing this from memory but as long as the "document.layers" is correct it will return true only on NS4
so...
If (document.layers){
call to function ILAYER
}
else {
call to function IFRAME
}

Just tested it, should work.

gmiller

10+ Year Member



 
Msg#: 383 posted 8:45 pm on Mar 7, 2001 (gmt 0)

Why are you testing at all? Why not just wrap an ILAYER around an IFRAME the way DoubleClick does?

rcjordan

WebmasterWorld Senior Member rcjordan us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 383 posted 10:13 pm on Mar 7, 2001 (gmt 0)

>wrap iframe in ilayer

Seems to me I tried that once at it blew up, but that may have been because of NS3 legacy problems.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved