Netscape

D

Desotuatail

Please can anyone tell me how I can tell which browser is used.
Netscape or IE (Versions might be helpfull)

TIA

Paul.
 
W

Whitecrest

Please can anyone tell me how I can tell which browser is used.
Netscape or IE (Versions might be helpfull)

You can get that information either from javascript or server side
scripting. Search google and you will be rewarded with ton's of example
code for either method.

Neither method is 100% accurate, but they are both close, and will give
you a good idea.
 
P

PeterMcC

Desotuatail said:
Please can anyone tell me how I can tell which browser is used.
Netscape or IE (Versions might be helpfull)

You can use js "browser-sniffing" - see:
http://www.webreference.com/tools/browser/javascript.html
but, if you were to say why you want to do this, you'll probably get more
useful solutions that avoid rather unreliable detection methods. For
instance, if it's so you can serve up a different stylesheet for NN4.x,
there is the @import hack - see:
http://w3development.de/css/hide_css_from_browsers/import/
 
D

Desotuatail

Thanks for your help on thi issue. One of the problems is simply the size of an
input text box. I used (years ago width="100" have been told on this group to
use width:20px. Netscape does not like this.
What I thought would be a good idea, would be to have a default .asp page
and to check the browser type. set a session variable and use this through out
the web site. I have

<SCRIPT LANGUAGE="JavaScript">
<!--

var bName = navigator.appName;
var bVer = parseFloat(navigator.appVersion);
if (bName == "Netscape")
var browser = "NS"
else
var browser = "IE";

// -->
</SCRIPT>

but can i now set session variables for IE or NS and versions then do a
response.write to the original home page.

Paul.

Desmond.
 
T

Toby A Inkster

Desotuatail said:
if (bName == "Netscape")
var browser = "NS"
else
var browser = "IE";

This script seems to assume that any non-Netscape browser is Internet
Explorer. That is simply not true.
 
K

kchayka

Toby said:
This script seems to assume that any non-Netscape browser is Internet
Explorer. That is simply not true.

This scrips also seems to assume that all versions of Netscape are
created equal. That is most definitely not true, either.
 
D

Desotuatail

I am not realy concerened about browsers other than Netscape or IE. What I am
concerened is how (while checking for these 2 browsers using Javascript I can
set a session variable so that it can be used as a flag for other pages in the
website.

Paul.
 
K

Kris

I am not realy concerened about browsers other than Netscape or IE. What I am
concerened is how (while checking for these 2 browsers using Javascript I can
set a session variable so that it can be used as a flag for other pages in the
website.

Paul.

Start a new thread.
 
D

Dave Gorman

I am not realy concerened about browsers other than Netscape or IE. What I am
concerened is how (while checking for these 2 browsers...

What 2 browsers? Have you any idea of the difference between NS4 and NS7?
Or the differences between IE5.0 and 6.0 or IE5 for Mac and Windows?

Since most modern browsers are capable of rendering well made pages more
or less the same (IE6, Mozilla, Opera, Safari in strict mode) why bury
your head in the sand and pretend there are only 2 browsers, all versions
of which behave the same?
 
D

Desotuatail

Ok I get the message
nobody knows how to add a Session("Bowser") = "X"
within Javascrpt

<scipt>
</script>

Tags
 
S

Steve Pugh

Ok I get the message
nobody knows how to add a Session("Bowser") = "X"
within Javascrpt

<scipt>
</script>

Tags

Session variables are set by server side processes not by client side
scripts like JavaScript. The closest you can get in JavaScript is to
set a cookie and then read that back on every page.

Steve
 
W

Whitecrest

Session variables are set by server side processes not by client side
scripts like JavaScript. The closest you can get in JavaScript is to
set a cookie and then read that back on every page.

Or just pass it from page to page.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top