homepage Welcome to WebmasterWorld Guest from 54.224.179.98
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




msg:605096
 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




msg:605097
 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




msg:605098
 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




msg:605099
 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




msg:605100
 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




msg:605101
 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