Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Go Back   Code Forums > Application and Web Development > HTML, XML, Javascript, AJAX
User Name
Password

Reply
 
LinkBack Thread Tools Display Modes
Old 12-21-2004, 11:26 AM   #1 (permalink)
falsepride
Regular Contributor
 
Join Date: Oct 2004
Posts: 192
falsepride is on a distinguished road
browser identification

okay on my site, im using filters for my menu hover. but only mozilla and ie have the alpha filter as far as i know. so whats the best way to indentify if the user is using ie or mozilla?
__________________
falsepride is offline   Reply With Quote
Old 12-21-2004, 12:18 PM   #2 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,397
sde is on a distinguished road
is this page php? if so, you could do something like
PHP Code:
<?
if(strstr($_SERVER['HTTP_USER_AGENT'],"MSIE")){
  
// PRINT IE STUFF
}else{
  
// PRINT OTHER STUFF
}
?>
__________________
testing 1 2 3
sde is offline   Reply With Quote
Old 12-21-2004, 04:08 PM   #3 (permalink)
falsepride
Regular Contributor
 
Join Date: Oct 2004
Posts: 192
falsepride is on a distinguished road
it could be php, but i did post it under javacript so i was thinking of doing javascript. i remember reading once that using server side is a way better than using client side for browser detection, is this true? and what would mozilla produce instead of MSIE?
__________________
falsepride is offline   Reply With Quote
Old 12-21-2004, 06:56 PM   #4 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,397
sde is on a distinguished road
i prefer server-side because it will work the same everytime.
PHP Code:
<?
echo $_SERVER['HTTP_USER_AGENT'];
?>
then just pull up that page with different browsers and see what u get. it just returns a string. get creative on how you use those strings.
__________________
testing 1 2 3
sde is offline   Reply With Quote
Old 12-22-2004, 01:17 PM   #5 (permalink)
falsepride
Regular Contributor
 
Join Date: Oct 2004
Posts: 192
falsepride is on a distinguished road
well you mite as well move this threat do php. thanks for the help.
__________________
falsepride is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Firefox browser to hit 1.0 milestone sde Code Newbie News 0 09-14-2004 10:11 AM
Selfmade Browser TerryJones HTML, XML, Javascript, AJAX 7 06-18-2004 07:58 AM
flush output to browser sde Java 2 05-06-2004 04:08 PM
Voice operated Web browser in the works sde Code Newbie News 0 03-29-2004 07:37 AM
Feds reject Eolas browser patent redhead Code Newbie News 0 03-08-2004 05:54 AM


All times are GMT -8. The time now is 06:49 PM.


Powered by vBulletin Version 3.6.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2006, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting
Open Circle