SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Zealot
    Join Date
    Feb 2006
    Posts
    124
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Only Do X If Using IE - FireFox Bug

    http://tinyurl.com/2kal4d

    In that link above I have a lightbox pop over that is converting at a strong 40%+ of visitors.

    The issue is that it gets lost behind the flash player in Mozilla Firefox - I need to ONLY run the lightbox popup on internet explorer, unless there is a firefox fix.

    Firefox comprises of 17% of my visitors - I need to get this fixed.


    How can I execute the lightbox code under ONLY internet explorer


    Thank you SO MUCH in advance

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,145
    Mentioned
    190 Post(s)
    Tagged
    2 Thread(s)

    only IE

    Have you tried conditional comments?

  3. #3
    SitePoint Zealot
    Join Date
    Feb 2006
    Posts
    124
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How do I do those Mittineague?

    That sounds like my ticket, those won't be recognized in Firefox?

    THANK YOU!

  4. #4
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,145
    Mentioned
    190 Post(s)
    Tagged
    2 Thread(s)

    conditional comments

    Conditional comments are only recognized by IE. All other browsers interpret them as comments. There are variations depending if you want to test for different versions of IE for example, but this should work for you
    HTML Code:
    <!--[if IE]>
    Special instructions for IE here
    <![endif]-->
    http://msdn2.microsoft.com/en-us/library/ms537512.aspx

  5. #5
    SitePoint Zealot
    Join Date
    Feb 2006
    Posts
    124
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It is amazing to find such helpful people like yourself.

    Thank you so much, it works perfectly now :-)

  6. #6
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,804
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    That is the HTML version of conditional comments. There is also a JScript/JavaScript version of conditional comments to test if the browser is running JScript (IE) or JavaScript (not IE).

    Code:
    /*@cc_on
        @if (@_jscript) 
            alert('JScript');
        @else */ 
            alert('JavaScript');
     /* @end @*/
    Also with Flash, whether you can put things in front of it or not depends on the windows mode setting. If you have it set to the default of 'window' it will always be in front. If you set wmode="transparent" or wmode="opaque" then other parts of the page can overlap in front of it.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  7. #7
    SitePoint Enthusiast
    Join Date
    Oct 2007
    Location
    Sydney, Australia
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just to add to the list, a javascript way of doing it.

    Code:
    if (document.all && !window.opera)
    {
           ...
    }
    Kind Regards,
    Steve
    http://www.rtepad.com


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •