Solved

mouseover form info in different frame

Posted on 1998-08-03
6
211 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

911 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now