Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-12-2010, 10:18 AM   PM User | #1
tpeck
Regular Coder

 
tpeck's Avatar
 
Join Date: Oct 2002
Location: Sydney, Australia
Posts: 771
Thanks: 40
Thanked 5 Times in 4 Posts
tpeck is on a distinguished road
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)
tpeck is offline   Reply With Quote
Old 11-12-2010, 11:49 AM   PM User | #2
gusblake
Regular Coder

 
Join Date: Jan 2006
Posts: 568
Thanks: 6
Thanked 84 Times in 84 Posts
gusblake is on a distinguished road
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.
gusblake is offline   Reply With Quote
Old 11-13-2010, 12:33 AM   PM User | #3
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,162
Thanks: 59
Thanked 3,992 Times in 3,961 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
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.
Old Pedant is offline   Reply With Quote
Old 11-13-2010, 07:31 AM   PM User | #4
tpeck
Regular Coder

 
tpeck's Avatar
 
Join Date: Oct 2002
Location: Sydney, Australia
Posts: 771
Thanks: 40
Thanked 5 Times in 4 Posts
tpeck is on a distinguished road
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)
tpeck is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 12:43 PM.


Advertisement
Log in to turn off these ads.