What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Detecting Web Browser

Detecting Web Browser
Author: Message:
Zephyr
Senior Member
****

Avatar
monster.rat

Posts: 950
Reputation: 26
35 / Male / Flag
Joined: Jan 2005
RE: Detecting Web Browser
You can use these javascript codes:

code:
<html>
<script>
if(navigator.userAgent.indexOf("Firefox") != -1)
{
   window.location = "http://www.mpsupport.net/index.php";
}
else
{
   window.location = "http://www.mpsupport.net/ie/";
}
</script>
</html>


This will detect whether firefox is the browser and go to  http://www.mpsupport.net/index.php. If firefox is not detected then it will go to http://www.mpsupport.net/ie/.

You can also use this for certain browsers.

code:
<html>
<script>
if(navigator.userAgent.indexOf("Firefox") != -1)
{
   window.location = "http://www.mpsupport.net/index.php";
}
else if(navigator.userAgent.indexOf("MSIE") != -1)
{
   window.location = "http://www.mpsupport.net/ie/";
}
else if(navigator.userAgent.indexOf("Netscape") != -1)
{
   window.location = "http://www.mpsupport.net/ie/";
}
else
{
   window.location = "http://www.mpsupport.net/ie/";
}
</script>
</html>



This post was edited on 09-03-2005 at 12:22 PM by Zephyr.
[Image: rhcpsig38tj.png]
09-03-2005 12:22 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Detecting Web Browser - by user27089 on 09-03-2005 at 12:13 PM
RE: Detecting Web Browser - by Zephyr on 09-03-2005 at 12:22 PM
RE: Detecting Web Browser - by Yousef on 09-03-2005 at 12:37 PM
RE: Detecting Web Browser - by user27089 on 09-03-2005 at 12:38 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On