It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming JavaScript Forum

browser detection...

browser detection...

Postby hazrizal84 on Fri Jul 25, 2008 3:15 pm

hi guys..plz help me solve this prob..
i've index.php..in that page,i wanna check wheter user use IE browser. if does, it will redirect them to main.php..if doesn't, it will stay at that main page, index.php..
i'm looking 4ward for those who can help me...thanx alot..
hazrizal84
 
Posts: 22
Joined: Tue Jun 10, 2008 11:25 am

Postby flabbyrabbit on Fri Jul 25, 2008 9:31 pm

A simple google search http://www.google.com/search?q=browser+detection+and+redirect resulted in this:
Code: Select all
HEAD>
<SCRIPT language="JavaScript">
<!--
var browserName=navigator.appName;
if (browserName=="Microsoft Internet Explorer") {
   window.location = "main.php";
} else {
   window.location = "index.php";
}
//-->
</SCRIPT>
</HEAD>
Should be what you are looking for.

Flabby Rabbit
Image
User avatar
flabbyrabbit
500+ Club
 
Posts: 706
Joined: Thu Jan 25, 2007 1:10 pm
Location: Midlands, England

Postby hazrizal84 on Fri Jul 25, 2008 11:07 pm

Thanx alot..!
hazrizal84
 
Posts: 22
Joined: Tue Jun 10, 2008 11:25 am


Who is online

Users browsing this forum: No registered users and 4 guests