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:
user27089
Disabled Account


Posts: 6321
Joined: Nov 2003
Status: Away
O.P. Tongue  Detecting Web Browser
I'm not sure if this is possible, but:

I have re-designed the Messenger Plus! Support website, and it didn't work very well in Internet Explorer or Opera, so what I did, was create a new folder, called "IE", which runs perfectly fine in IE & Opera. Is there anyway that I could automatically send those with IE/Opera to http://www.mpsupport.net/ie/ rather than http://www.mpsupport.net/index.php?

I don't mind what type of code is used... Saral has a code similar to this, where, if the person is using Internet Explorer, then the image that is a .png changes to a .gif, so it is still transparent.
09-03-2005 12:13 PM
Profile PM Find Quote Report
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
Yousef
Full Member
***

Avatar
(previously known as Juzzi)

Posts: 487
Reputation: 19
35 / Male / Flag
Joined: Jul 2004
RE: Detecting Web Browser
I don't think this is a good way to do it. You'd better make the code ie-compatible. I could help you, ask me on msn :)
Developer of BuddyFuse: Google Talk, Twitter and Hyves in Windows Live Messenger
Ex-Microsoft intern and Windows Live Developer MVP in 2007 & 2008
09-03-2005 12:37 PM
Profile E-Mail PM Web Find Quote Report
user27089
Disabled Account


Posts: 6321
Joined: Nov 2003
Status: Away
O.P. RE: Detecting Web Browser
I prefer using PNG images though and having a better quality website, it is fine how it is, just doing some testing in Opera now...

Thanks for the off Juzzi, but no thanks...

Fixed it all now thanks.

http://www.mpsupport.net

try it out!

This post was edited on 09-03-2005 at 12:47 PM by user27089.
09-03-2005 12:38 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »


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