Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
How do I display text that varies depending on the browser?
Old 12-23-2008, 12:30 AM How do I display text that varies depending on the browser?
Skilled Talker

Posts: 90
Trades: 0
Hi all,

I'm looking for a simple script that will display specified text according to the browser the user is viewing the page on. For instance, if you went to the page on Firefox, it might say nothing, if you view it in IE, it might tell you to switch browsers because the page isn't compatible, etc.

This script will relate to an admin page I have that doesn't function properly with IE and as I try to fix it, I want some sort of reminder/notice that if you're viewing it in IE, you need to switch browsers before doing anything.

Any help is appreciated, thanks in advance!
msaz87 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-23-2008, 12:58 AM Re: How do I display text that varies depending on the browser?
Banned

Latest Blog Post:
Oscar: The Bionic Cat
Posts: 237
Trades: 0
you mean like this one: http://www.w3schools.com/js/js_browser.asp
bogs is offline
Reply With Quote
View Public Profile Visit bogs's homepage!
 
Old 12-23-2008, 05:01 AM Re: How do I display text that varies depending on the browser?
Insensus's Avatar
Ultra Talker

Posts: 487
Name: Mark Stegeman
Location: Netherlands, Europe
Trades: 0
Using PHP is safer, because you can switch off JavaScript.
http://php.net/function.get-browser
__________________
<?php ($helpfull>0)?$talkupation++ : '';?>
Insensus is offline
Reply With Quote
View Public Profile
 
Old 12-23-2008, 05:21 AM Re: How do I display text that varies depending on the browser?
Skilled Talker

Posts: 90
Trades: 0
I went ahead and used the javascript approach... it should do the trick nicely though, there's really only two people who will be looking at the page it's featured on.

Thanks for the help
msaz87 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to How do I display text that varies depending on the browser?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.32294 seconds with 12 queries