Skip to main content

Bug Tracker

Side navigation

#1017 closed bug (wontfix)

Opened March 02, 2007 12:45PM UTC

Closed March 31, 2008 01:26AM UTC

imagebox variables conflict with DOM objects with the same ID (ex: "container") in IE6/7

Reported by: wick Owned by: stefan
Priority: major Milestone:
Component: interface Version: 1.1.2
Keywords: imagebox, unscoped, variables, conflict, IE6, IE7 Cc:
Blocked by: Blocking:
Description

When an DOM object exists with an ID that matches one of the improperly scoped Imagebox (v1.2) variables used in imagebox.js (container, nextImage etc), the Imagebox init process causes a javascript error in IE (6 or 7) & the imagebox does not function. I believe this is due to conflicts with IE's shorthand DOM references. Properly scoping the Imagebox variables appears to solve the issue.

For example, the presence of <div id="container">..</div> anywhere in web page will produce in the error.

Attachments (0)
Change History (3)

Changed March 02, 2007 01:27PM UTC by wick comment:1

oops, this is a dup of bug #917 "ie problem"

Changed March 28, 2007 01:42PM UTC by versatilia comment:2

(adding note to this bug rather than #917 because it's better described)

We hit this bug too - line 362 of imagebox.js sets a variable called 'gallery'. If you have a <div id="gallery"> then it'll just abandon the function at that point. Behaviour is strange - no IE script errors but the function literally gets abandoned, eg:

 <div id="gallery">
 <a href="blah" rel="test">test</a>
 </div>
 ...
 <script>
 jQuery("a[@rel=test]").each( function(){ $(this).bind('click',function(){
      alert("entering onclick function");
      gallery="some value"; // setting a variable with the same name as an ID
      alert("this will not be displayed in IE6");
      return false; // this is not executed in IE6
 });});
 </script>

Changed March 31, 2008 01:26AM UTC by scott.gonzal comment:3

description: When an DOM object exists with an ID that matches one of the improperly scoped Imagebox (v1.2) variables used in imagebox.js (container, nextImage etc), the Imagebox init process causes a javascript error in IE (6 or 7) & the imagebox does not function. I believe this is due to conflicts with IE's shorthand DOM references. Properly scoping the Imagebox variables appears to solve the issue.\ \ For example, the presence of <div id="container">..</div> anywhere in web page will produce in the error.When an DOM object exists with an ID that matches one of the improperly scoped Imagebox (v1.2) variables used in imagebox.js (container, nextImage etc), the Imagebox init process causes a javascript error in IE (6 or 7) & the imagebox does not function. I believe this is due to conflicts with IE's shorthand DOM references. Properly scoping the Imagebox variables appears to solve the issue. \ \ For example, the presence of <div id="container">..</div> anywhere in web page will produce in the error.
need: → Review
resolution: → wontfix
status: newclosed

Interface is no longer supported; consider switching to jQuery UI.