Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

check browser... 4

Status
Not open for further replies.

soonkhoo

Programmer
Dec 8, 2000
133
MY
I don't know if this had been answered somewhere. But how do you check browser so that if the user is using Netscape, there's a different version of page loaded.

Thanks.
Soon
 
of course, it's been answered many times. in any case, it's very simple (and there are several ways of doing this), so i'll just post it here:

nn = (document.layers)? true:false
ie = (document.all)? true:false
if (nn) location.href="for_netscape.htm"
if (ie) location.href="for_explorer.htm"

---
---
 
Next generation browser:

var N6 =(document.getElementById && navigator.appName=="Netscape")?1:0;

etc... You may want separate ones for positioning's sake - since they STILL don't match.
b[sup]2[/sup] - benbiddington@surf4nix.com
 
This is getting worse and worses. Basically nowdays you need four versions of your pages: 1) ie4 or higher; 2) nn4 3) nn6; 4) older browsers.

Bangers, I start thinking more and more often that we should all "stand up for our right" and support that movement for browser upgrade. I mean, really that's what standards are for. I want to make one page that appears correctly on all devices whether it is an IE, Opera, mobile phone or browser-capable washing machine. For details of the movement, please go there:
So what do you think, gentlemen?

---
---
 
Hi Rydel,
a little correction to your list:
I think you may through away old browsers (v.3 and earlier), but should add Opera - navigator.appName == "Opera"
 
Yeah! I totally support that standard upgrading. It's annoying. Anyway, thanks for the help.:)

Soon
 
Hi,

Just code for IE and redirect everything else on a text version.... ;-)

Bye. Un fromage havarti en vaut deux.
 
yahve...you have no idea how I want to tell that 12% that still use Netscape (most of which still use NN4.x) to "stick it."

heh...I installed NS6 today....dang thing refused to try to bring up any webpage at all. ------------------------------------
"Unclean beast! Get thee down! Be thou consumed by the fires that made thee!" - Brother Jacobus in Dragonslayer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top