[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

referencing another page

Posted on 2000-05-18
6
Medium Priority
?
203 Views
Last Modified: 2011-10-03
I have a frameset: top,main and banner html pages. I have an image in top.html that changes on certain onmouseover events. Can I reference the image in top.html from an onmouseover event in banner.html?

hope this question makes sense.

ta.
0
Comment
Question by:reido2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 8

Accepted Solution

by:
xabi earned 90 total points
ID: 2820784
Yep:

Example:

parent.page_name.images["imagename"].src = 'foo.gif'

please change "page_name" for the name of the page you give at the frameset and "imagename" for the real image name

xabi
0
 
LVL 8

Expert Comment

by:xabi
ID: 2820788
0
 

Author Comment

by:reido2
ID: 2820920
I cannot get this to work.

my index.html page has one frameset:

<html>
<frameset cols=25%,*>
      <frame name="page1" src="page1.html">
      <frame name="page2" src="page2.html">
</frameset>
</html>

the code on page1.html is:

<html>
<body>
   <img id=me src="button1.gif" onclick=parent.page2.images["fill"].src="button2.gif">
</body>
</html>

the code on page2.html is:
<html>
<body>      
      <img id=fill src="button1.jpg">
</body>
</html>

This should work but it doesn't any ideas?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 22

Expert Comment

by:CJ_S
ID: 2821065
<img id=me src="button1.gif" onclick='parent.page2.images["fill"].src="button2.gif"'>

But this'll only work with IE. For compatibility with NN you should instead use:

<a href="#" onclick='parent.page2.images["fill"].src="button2.gif"; return false;'><img id=me src="button1.gif"></a>

or even

<a href='javascript:parent.page2.images["fill"].src="button2.gif";return false;'><img id=me src="button1.gif"></a>


Good luck,
CJ
0
 
LVL 8

Expert Comment

by:xabi
ID: 2821206
the code on page2.html should be:

<html>
<body>
<img id=fill name="fill" src="button1.jpg">
</body>
</html>

xabi

PS: Note the "NAME" tag
0
 

Author Comment

by:reido2
ID: 2821261
I still could not for the life of me get that to work. I amended the code to read:

onclick=parent.page2.fill.src="button2.jpg"

I have spent too long on this so I will simply use that method.

But thanks anyway.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

649 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