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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Netscape 6.2 ? Hoo -aaH !! 2

Status
Not open for further replies.

fxcolin

Technical User
Oct 14, 2001
169
CA
Well, I've been trying to a funky custom-colored form utilizing css. And I'll be damned if Netscape 4.78 would pick it up ! Either it shows a total blank page or it freezes or it takes 2 minutes to render.

You know, trying to do the right thing and make it compatible with older browsers. Anyway fed up and downloaded Netscape 6.2 for fun. And I'll be damned if Netscape 6.2 looked almost identical to IE 5.5 . Holy smokes what an awesome surprise.

So on to my question...
I've decided that on this site, I would like to through netscape 4.7 out the window.
So does anyone have a script to notify old browser users to up-grade their browsers. Maybe a pop-up with a link to the upgrade site ??

I'll probably do a search on google and hotscripts, but curious if anyone here has a good one.


Later, Skater

 
Try something general, like this:

<script>
if(navigator.appName == &quot;Netscape&quot; && navigator.appVersion < '6') {
alert(&quot;Sorry, you have an older version of Netscape. Please upgrade to a newer version. A newer version can be found at: }
</script>
I have not failed; I merely found 100,000 different ways of not succeding...
 
BTW, tek-tips automaticaly put an semi-colon deirectly after the
Code:
www.netscape.com
, so disregard that, ok?? I have not failed; I merely found 100,000 different ways of not succeding...
 
Hi mate,

Server side checks can be done with SSI if you have that available.

There are 2 ways to go about this, either don't show the contents of the site to older browsers, or show a extra note at the top of the page telling the user to upgrade to see the site properly.

The following would stop the user from seeing the site:

Code:
<!--#if expr=&quot;${HTTP_USER_AGENT} = /MSIE 4/&quot; -->
<!--#set var=&quot;browser&quot; value=&quot;oldIE&quot; -->
<!--#set var=&quot;brtype&quot; value=&quot;msie&quot; -->
  <!--#elif expr=&quot;${HTTP_USER_AGENT} = /MSIE 3/&quot; -->
<!--#set var=&quot;browser&quot; value=&quot;oldIE&quot; -->
<!--#set var=&quot;brtype&quot; value=&quot;msie&quot; -->
   <!--#elif expr=&quot;${HTTP_USER_AGENT} = /MSIE 2/&quot; -->
<!--#set var=&quot;browser&quot; value=&quot;oldIE&quot; -->
<!--#set var=&quot;brtype&quot; value=&quot;msie&quot; -->
    <!--#elif expr=&quot;${HTTP_USER_AGENT} = /Mozilla\/4/ && $brtype !=/msie/&quot; -->
<!--#set var=&quot;browser&quot; value=&quot;oldnetscape&quot; -->
     <!--#elif expr=&quot;${HTTP_USER_AGENT} = /Mozilla\/3/ && $brtype !=/msie/&quot; -->
<!--#set var=&quot;browser&quot; value=&quot;oldnetscape&quot; -->
      <!--#elif expr=&quot;${HTTP_USER_AGENT} = /Mozilla\/2/ && $brtype !=/msie/&quot; -->
<!--#set var=&quot;browser&quot; value=&quot;oldnetscape&quot; -->
      <!--#elif expr=&quot;${HTTP_USER_AGENT} = /Mozilla\/1/ && $brtype !=/msie/&quot; -->
<!--#set var=&quot;browser&quot; value=&quot;oldnetscape&quot; -->
    <!--#else -->
ALL OF THE NORMAL PAGE CONTENT GOES HERE
<!--#endif -->

<!--#if expr=&quot;$browser = /oldnetscape/&quot; -->
<b>Please upgrade your browser at [URL unfurl="true"]http://www.netscape.com[/URL] to view this site properly.</b>
<!--#elif expr=&quot;$browser = /oldIE/&quot; -->
<b>Please upgrade your browser at [URL unfurl="true"]http://www.microsoft.com[/URL] to view this site properly.</b> 
<!--#else -->

<!--#endif -->


Whereas, the following would add an extra line of text to the top of the page if the user was using an old browser:

Code:
<!--#if expr=&quot;${HTTP_USER_AGENT} = /MSIE 4/&quot; -->
<!--#set var=&quot;browser&quot; value=&quot;oldIE&quot; -->
<!--#set var=&quot;brtype&quot; value=&quot;msie&quot; -->
  <!--#elif expr=&quot;${HTTP_USER_AGENT} = /MSIE 3/&quot; -->
<!--#set var=&quot;browser&quot; value=&quot;oldIE&quot; -->
<!--#set var=&quot;brtype&quot; value=&quot;msie&quot; -->
   <!--#elif expr=&quot;${HTTP_USER_AGENT} = /MSIE 2/&quot; -->
<!--#set var=&quot;browser&quot; value=&quot;oldIE&quot; -->
<!--#set var=&quot;brtype&quot; value=&quot;msie&quot; -->
    <!--#elif expr=&quot;${HTTP_USER_AGENT} = /Mozilla\/4/ && $brtype !=/msie/&quot; -->
<!--#set var=&quot;browser&quot; value=&quot;oldnetscape&quot; -->
     <!--#elif expr=&quot;${HTTP_USER_AGENT} = /Mozilla\/3/ && $brtype !=/msie/&quot; -->
<!--#set var=&quot;browser&quot; value=&quot;oldnetscape&quot; -->
      <!--#elif expr=&quot;${HTTP_USER_AGENT} = /Mozilla\/2/ && $brtype !=/msie/&quot; -->
<!--#set var=&quot;browser&quot; value=&quot;oldnetscape&quot; -->
      <!--#elif expr=&quot;${HTTP_USER_AGENT} = /Mozilla\/1/ && $brtype !=/msie/&quot; -->
<!--#set var=&quot;browser&quot; value=&quot;oldnetscape&quot; -->
    <!--#else -->

<!--#endif -->

<!--#if expr=&quot;$browser = /oldnetscape/&quot; -->
<b>Please upgrade your browser at [URL unfurl="true"]http://www.netscape.com[/URL] to view this site.</b>
<!--#elif expr=&quot;$browser = /oldIE/&quot; -->
<b>Please upgrade your browser at [URL unfurl="true"]http://www.microsoft.com[/URL] to view this site.</b> 
<!--#else -->

<!--#endif -->

NORMAL PAGE CONTENT GOES HERE

Doing it this way, the user sees no annoying alert box generated by js.

BTW, I have not had time to test all of this but it should all work without a problem.

Hope this helps Wullie

sales@freshlookdesign.co.uk

 
Doing it this way, the user sees no annoying alert box generated by js.

That could easily be changed to this:
<script>
if(navigator.appName == &quot;Netscape&quot; && navigator.appVersion < '6') {
document.write=&quot;Sorry, you have an older version of Netscape. Please upgrade to a newer version. A newer version can be found at: }
</script>

Rick
 
I agree with Wullie that it is better to keep as much scripting server side as possible, especially if you want to make sure that there is a good chance that your scripts will always work. I'm a big proponent of ssi, so I like Wullie's suggestion, and think you will find it more stable than js. There are still people surfing the net with flavors of browsers that have problems with JavaScript. *g* there are people out there who surf with browsers that don't read JavaScript. As many times as I have heard that people actually turn off JavaScript, in fact lots of people do that. It must be pretty boring surfing though.

I have a general rule of thumb, if I can do it server side, I do it server side. If I can do it another way besides JavaScipt, then I need a compelling reason to use JavaScript. Also the js alert boxes, to me, are as annoying as a pebble in my shoe. Doing form required field checking is soooooo annoying when done via js. Well...at least in the way it is normally done using js.

mike
 
I use server side for my pages, too, when I can. I was just saying it was possible to achieve the same effect using js. Actually, 11% of the people using the internet have javascript disabled! That's hard to believe. What are they afraid of?--getting a virus?

Rick
 
Rick,

A lot of people turn IE security to high and this automatically disables js.

Also, most of the people that I know who have js disabled do it because they don't want to see any pop-up windows.

Mike,

What you have to think about is that these people are using an old browser, so most pages are already going to look either weird or boring. [wink]

Thanks for the stars. Wullie

sales@freshlookdesign.co.uk

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top