Solved

mouseover form info in different frame

Posted on 1998-08-03
6
221 Views
Last Modified: 2012-06-27
How do I point mouseover text information to a form in a different frame?  I'm just using a simple info box ( onMouseover="document.navigateform.navigatetext.value='HISTORY'" ) and would like to put the form in a different frame.
0
Comment
Question by:yfcbdn
  • 3
  • 3
6 Comments
 
LVL 2

Accepted Solution

by:
bernfarr earned 150 total points
ID: 1230846
First of all, this is a JavaScript question.

To do this you need to know which frame you are using. Then you simply do:
  onMouseOver="Window.frames[X].document.formN.textM.value='Val'"

for X, formN, textM, substitute your values.

0
 

Author Comment

by:yfcbdn
ID: 1230847
That's what I thought, but it gives a "window undefined" error.  Here's the line...

onMouseover="Window.frames[opentopright].document.navigateform.navigatetext.value='HISTORY'

It works properly when the form is on the same page (minus the 'window.frame[x]').  But it returns the error when I try to point it to another frame (named: opentopright).


0
 
LVL 2

Expert Comment

by:bernfarr
ID: 1230848
If your frame is called opentopright, the HTML should look like:
  <FRAME NAME="opentopright" ... >

then you should be able to simply use:
onMouseover="Window.opentopright.document.navigateform.navigatetext.value='HISTORY'

The frame itself becomes a property of the parent Window object.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:yfcbdn
ID: 1230849
yep, but it still returns an "undefined window".  The two frames are in different framesets from each other, but I tried moving the form to a frame in the same set - still had the same error. Not sure what I am missing.  I am using Frontpage.  Here is the url.

www.yfccanada.com/testopen.htm
0
 
LVL 2

Expert Comment

by:bernfarr
ID: 1230850
OK, I played with it for a while. Be aware the Netscape and IE can forgive different errors. It's best to be aware of the JavaScript object hierarchy and be very specific about what you want to access.

Change your OnMouseOver and OnMouseOut to the following and it will work:
onMouseover="parent.opentopright.document.navigateform.navigatetext.value = 'HISTORY'" onMouseout="parent.opentopright.document.navigateform.navigatetext.value=''"

Note that I added the document object to the hierarchy. I've tested it with Netscape 4.04 and IE 4.0 (both on NT) and it works fine in both. You should also check it in other versions, but I think it'll be fine.
0
 

Author Comment

by:yfcbdn
ID: 1230851
Fantastic.  Thanks a lot for your patience and help.  I really appreciate it!


Regards

mark
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
JList custom Cell Renderer refresh 15 57
Maven Project: Hibernate Dependencies Conflict 10 22
login jsp example 24 49
Java: anonymous class 4 19
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question