View Full Version : Overlapping Content Link

11-11-2005, 09:27 PM
I was editing the overlapping content link script so it would pop up under the link instead of over. But, I found that after editing, the script did not work on IE. (I use firefox). You can find the script in action here: http://www.hoksang.com/apo/test.php

This is what i edited:

function getposOffset(overlay, offsettype){
var totaloffset=(offsettype=="left")? overlay.offsetLeft : overlay.offsetBottom;
var parentEl=overlay.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetBottom;
return totaloffset;

function overlay(curobj, subobj){
if (document.getElementById){
var subobj=document.getElementById(subobj)
subobj.style.left=getposOffset(curobj, "left")+"px"
subobj.style.bottom=getposOffset(curobj, "bottom")+"px"
return false
return true

function overlayclose(subobj){


How come it doesn't work in IE?

Also, is this link abitrary?

<b><a href="wonderwoman.htm" onClick="return overlay(this, 'subcontent')">Wonder Woman</a></b><br>

the target location doesn't seem to matter as long as the overlay target works..am I right? or do I actually need to create a wonderwoman.htm?