Solved

mouseover form info in different frame

Posted on 1998-08-03
6
200 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:yfcbdn
Comment Utility
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
Comment Utility
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
Comment Utility
Fantastic.  Thanks a lot for your patience and help.  I really appreciate it!


Regards

mark
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
The viewer will learn how to implement Singleton Design Pattern in Java.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

743 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

8 Experts available now in Live!

Get 1:1 Help Now