jerry2
Posts: 120
Joined: Wed Mar 14, 2007 1:03 pm

Conflict between scripts

Hi there

I use the HTMLHttpRequest Library from Angus Turnbull

http://www.twinhelix.com/javascript/htmlhttprequest/

After 2 days of research I found out IE 6 and IE 7 do not work with your script any more. What is funny is the HTML expand works, but image expand does not.

I have searched through HTMLHttRequest library and here is the offending code:

// addEvent is defined within htmlhttprequest.js, feel free to reuse :).
addEvent(document, 'click', function(evt)
{
// Here we capture all clicks on the document, scanning for links with a CLASS
// attribute of "loadinto-IdOfTarget" and routing them to loadInto() above.
evt = evt || window.event;
// Only process left clicks.
if (evt.which > 1 || evt.button > 1) return;
var src = evt.target || evt.srcElement;
if (src.nodeType && src.nodeType != 1) src = src.parentNode;
// Loop up the DOM tree scanning all elements to find a matching one.
while (src)
{
var srcName = (src.nodeName||src.tagName||'').toLowerCase();
if (srcName == 'a' && src.className && src.className.match(/^(load|toggle)into-(.+)$/))
{
// Call our load handlers if we have a match; they'll cancel the normal action.
if (RegExp.$1 == 'load') return loadInto(src, RegExp.$2, evt);
if (RegExp.$1 == 'toggle') return toggleInto(src, RegExp.$2, evt);
}
src = src.parentNode;
}
}, 1);

If I remove this code Highslide works again on IE6 and IE7. I do not say it is your script fault, I fear it is the HTMLHttpRequest fault, but as you a a very friendly and smart guy, do you have a clue of what in this code offends IE6 and IE7 for picture popup? My javascript is beginners I don't understand a line here :-(

Yours

Jernej

Return to “Highslide JS Usage”