Browser Detect/Redirect Problem

They have: 218 posts

Joined: Apr 2001

I'm having a browser redirect problem. I'm using Dreamweaver 4.0 on this page, I want to redirect Netscape browsers to an alt URL specified in behaviors...when the page loads in Netscape, this is not happening.

Any ideas,

Thanks,

TonyMontana

Abhishek Reddy's picture

He has: 3,348 posts

Joined: Jul 2001

hi,

dont know what DW does...but this is what i use for redirection Laughing out loud:

<script lanuage="JavaScript">
  function redirect_user()
   {
     if (navigator.appName=="Netscape")
      {
        window.location="<em>NS_URL.htm</em>";
      }
     else
      {
    
      }
   }
&lt;/script&gt;
'
stick that between the tags and use:

Smiling

Abhishek Reddy's picture

He has: 3,348 posts

Joined: Jul 2001

you will not believe how long it took me to do the color coding in the previous post. Laughing out loud:D

similarly, like the appName=="Netscape" you could add appVersion<4.

eg (no colors Sticking out tongue):

if (appName=="Netscape" && appVerion<4)
basically this does the same, but also checks if the browser version is less than 4.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.