View Full Version : Display message and link if user is in IE

04-13-2007, 07:50 PM
Hello All,
I recently discovered a problem with the gallery on my website when users try to look at pictures using Internet Explorer. The good news is I fixed the problem, and made an alternate copy of the gallery which does work properly using Internet Explorer. Now instead of automatically redirecting them to the IE compatible one, I would like to place a link to the compatible gallery if they are using Internet Explorer. I tried modifying a couple other browser detection scripts to do this, but I could never seem to get it to work.
If any one could give me and ideas, that would be great!

04-14-2007, 12:22 AM
Place in the body:

<script type="text/javascript">
var msg = '<a href="">IE page</a>';
if (document.all) document.write(msg);

04-14-2007, 04:03 AM
Other browsers support document.all - this code will be seen only by IE:

<!--[if IE]>
<br>If you are dumb enough to be using IE:<br>
<a href="ie_page.htm">IE Version</a><br>

04-14-2007, 12:19 PM
<br>If you are dumb enough to be using IE:<br>

I knew there was a HTML way of doing it, I had just... uh. Forgot it :).

04-14-2007, 07:38 PM
Perfect! Thanks a lot guys, works great.