Link to home
Start Free TrialLog in
Avatar of MaxwellTurner
MaxwellTurnerFlag for Canada

asked on

Mouseover Popup Message - display message in another frame.

I thought this would be simple but I have having problems.  I have a frames page with a row along the top(named top), and 2 columns below.  In both columns (named left & right) I have links that onmouseover a description of the link will POP UP and will disappear again onmouseout.  This all works good.

What I need is for the pop-up message to appear in a DIV in the TOP frame when the mouse is placed over a link in either the LEFT or RIGHT frames.  Basically it will act as a HELP or INSTRUCTION box.  I also need the DIV in the TOP frame to display a default message like "Place your Mouse over a Link For Instructions" whenever the mouse IS NOT over a link - onmouseout I guess.

I tried to get the message to display in another frame by changing the JS by adding a parent.top:

if(navigator.family =="nn4") {
     parent.top.document.object1.document.write(desc);
     parent.top.document.object1.document.close();
     parent.top.document.object1.left=x+15;
     parent.top.document.object1.top=y-5;
     }
else if(navigator.family =="ie4"){
     parent.top.object1.innerHTML=desc;
     parent.top.object1.style.pixelLeft=x+15;
     parent.top.object1.style.pixelTop=y-5;
     }
else if(navigator.family =="gecko"){
     parent.top.document.getElementById("object1").innerHTML=desc;
     parent.top.document.getElementById("object1").style.left=x+15;
     parent.top.document.getElementById("object1").style.top=y-5;
     }

 but that didn't work.  I'm pretty sure that I can position it in the top frame, just not sure how to get it to appear there.

I have an example page posted at http://www.laservalley.com/popups.htm
if someone wants to take a shot at it.  I only have 30 points left - hope thats enough.

Thanks Max
ASKER CERTIFIED SOLUTION
Avatar of knightEknight
knightEknight
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of MaxwellTurner

ASKER

Works good!  I'm fairly new to javascript & had no idea that "top" was reserved - I do now!

Thanks

Max
Thanks again.

Max
glad to help!  Thanks for the A.

FYI - top refers to the top level window -- the one that contains the frameset (if there is a frameset).  If there is no frameset, then top == self == window .