Hi all,
I am populating a list of links. Each link is just some <span>'s (the first span has an image) and a couple of hidden <input>'s.
I attach an onclick listener to each link, and the callback function is the following:
For some strange reason, IE6 only changes document.location.href when the original event target was an <img>, even though the original target doesn't impact the final result. If I put alerts for the input values after the last line in that function, the correct values are displayed, it just doesn't want to execute the "document.location.href =" line unless the original target was the <img>.Code:var oTarget = YAHOO.util.Event.getTarget(e); // In YUI, this returns the clicked node. if(oTarget.nodeName.toUpperCase() != "A"){ oTarget = YAHOO.util.Dom.getAncestorByTagName(oTarget, "a"); // This one is self explanatory. } var oInputs = oTarget.getElementsByTagName("input"); document.location.href = "details.html?&location=" + oInputs[1].value + "&VIN=" + oInputs[0].value;
Only IE6 has this problem, and I've never experienced something like this before.
Can anyone shed some light on this? I am as stumped as it gets!![]()




Reply With Quote
Bookmarks