Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 198
  • Last Modified:

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
0
MaxwellTurner
Asked:
MaxwellTurner
  • 2
  • 2
1 Solution
 
knightEknightCommented:
"top" is a reserved word in client-javascript.  Try renaming your "top" frame to "topframe" or something else.  Then change the code accordingly and retest.  Let us know if you still have the problem.
0
 
MaxwellTurnerAuthor Commented:
Works good!  I'm fairly new to javascript & had no idea that "top" was reserved - I do now!

Thanks

Max
0
 
MaxwellTurnerAuthor Commented:
Thanks again.

Max
0
 
knightEknightCommented:
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 .
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now