...

View Full Version : Browser detection and ..



iNfans
01-30-2007, 08:16 PM
Hi everyone. I will write shortly, because I dont know english good..
So I need script, which will detect users browser, and if browser will be IE, then show some link in content, if browser is FireFox or Opera, then hide that link. Link looks like:


<tr>
<td align='center' valign='top'><a href='/' target='_blank'>link</a></td>
</tr>

Thanks to all for any help!

felgall
01-30-2007, 08:50 PM
Use HTML - no Javascript required.


<!--[if IE]>
<p>This content will appear in IE.</p>
<[endif]-->
<--[if !IE]-->
<p>This content will appear in all browsers except IE.</p>
<--[endif]-->

iNfans
01-30-2007, 09:07 PM
Stephen, thanks very much for help. A little problem, in IE when opening page this is showing: <[endif]-->

In FF and Opera works good.

_Aerospace_Eng_
01-30-2007, 09:11 PM
Stephen was close. He left out a >. Try this

<!--[if IE]>
<p>You are using IE</p>
<![endif]-->
<!--[if !IE]>-->
<p>You are not using IE</p>
<!--<![endif]-->

iNfans
01-30-2007, 09:27 PM
Thanks!!!!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum