Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder tpeck's Avatar
    Join Date
    Oct 2002
    Location
    Sydney, Australia
    Posts
    882
    Thanks
    53
    Thanked 6 Times in 5 Posts

    lightbox style popup conflicts with menu

    I have a few hundred popups that I am trying to change to a "lightbox" style solution:

    Code:
    <!DOCTYPE html>
    <html>
    
    <head>
    <title>Test 1</title>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>
    <script src="../../js/jquery.colorbox-min.js"></script>
    <link rel="stylesheet" href="../../css/colorbox5.css" media="screen">
    <script src="../../js/ssm.js" type="text/javascript"></script>
    <script src="../../js/ssmitems3a.js" type="text/javascript"></script>
    <link rel="stylesheet" href="../../css/ssmitems.css" type="text/css">
    
    <script>
    $(document).ready(function(){
    $("a[rel='tip']").colorbox();
    });
    </script>
    </head>
    
    </script>
    <body>
    <a rel="tip" href="tip1(AC)2.html"><img border="0" src="../../img/tipani1.gif" width="50" height="74"></a>
    </body>
    
    </html>
    The new colorbox popup solution works well, but in some browsers - notably IE - it conflicts with the SIDE MENU routine I use.

    I think the menu is old code, but it works.

    However, to get the new "lightbox-style" popup to work in IE, I have to include <!DOCTYPE html>.

    In the other browsers, omitting the declaration apparently solves the conflict problem (but I feel it ought to be there).

    I really don't know what to do. Tinker with the side menu code?

    Here is a demo with the <!DOCTYPE html> declaration:

    http://www.aapress.com.au/ieltsonlin...conflict1.html

    ...and without it:

    http://www.aapress.com.au/ieltsonlin...conflict2.html

    I have tried with a full declaration but it makes no difference at all. And further reading online suggests <!DOCTYPE html> is OK.

    Does anyone spot a reason for the conflict?
    The difference between genius and stupidity is that genius has its limits. (Albert Einstein)

  • #2
    Regular Coder
    Join Date
    Jan 2006
    Posts
    568
    Thanks
    6
    Thanked 84 Times in 84 Posts
    It's worth trying all the different DOCTYPEs first (loose, strict, transitional etc). It might be that different browsers default to different types, so you need to specify.

  • #3
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    26,695
    Thanks
    80
    Thanked 4,511 Times in 4,475 Posts
    WHY would you create a page that uses jQuery and then include an ancient history JS script from 2002 that is still trying to support MSIE 4 and Netscape 4 and who knows what else???
    Code:
    NS6=(document.getElementById&&!document.all)
    IE=(document.all);
    IE4=(document.all&&!document.getElementById)
    NS=(navigator.appName=="Netscape" && navigator.appVersion.charAt(0)=="4")
    OP=(navigator.userAgent.indexOf('Opera')>-1)
    jQuery can surely do a slider like that in maybe a half dozen lines of jQuery code.
    I'm not a jQuery uses, but I know I'd never try to mix jQuery with anything as ancient as that.

    If you see document.all in JS code, it's a sure sign you should RUN, not walk, as fast as you can away from that code.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #4
    Regular Coder tpeck's Avatar
    Join Date
    Oct 2002
    Location
    Sydney, Australia
    Posts
    882
    Thanks
    53
    Thanked 6 Times in 5 Posts
    Well, yes. If I could exactly match that SIDE MENU look and function with something like jquery I would. But I'm stuck with it unless the look and function is just about exactly reproducible (it's inside a huge proprietary system that runs old code on purpose! True...)

    But I agree with everything you say.
    The difference between genius and stupidity is that genius has its limits. (Albert Einstein)


  •  

    Posting Permissions

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