Solved

How to use <a href > with parent.frames ?

Posted on 2004-04-17
4
1,769 Views
Last Modified: 2012-06-21

In a web page, I have a link as <a href > in frame "left" and need to show a second web page in frame "right"... How can I do it?

This gets error:

<a href=''=parent.frames["right"].location.href= 'WebPageToShow.aspx' >
</a>

Thanks!
0
Comment
Question by:Desperate34
[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
  • 2
4 Comments
 
LVL 12

Accepted Solution

by:
venkateshwarr earned 75 total points
ID: 10851381
<a href='javascript:parent.frames["right"].location.href= "WebPageToShow.aspx"' > </a>

or

<a href="#" onclick='parent.frames["right"].location.href= "WebPageToShow.aspx"' > </a>
0
 
LVL 12

Expert Comment

by:lil_puffball
ID: 10851396
You can also just do this:

<a href="WebPageToShow.aspx" target=right>Click</a>
0
 
LVL 12

Expert Comment

by:lil_puffball
ID: 10851398
Also, make sure you've named the frames, or else it won't work:

<frameset cols=50%,50%>
<frame name=left src=left.htm>
<frame name=right src=right.htm>
</frameset>
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 10853551
Better than

<a href="#" onclick='parent.frames["right"].location.href= "WebPageToShow.aspx"' > </a>
would be


<a href="#"
onclick="parent.frames['right'].location.href='WebPageToShow.aspx';
return false" >... </a>

but lil_puffballs suggestion is the most sensible unless you MUST use script

Michel
0

Featured Post

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

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

This article shows how to create and access 2-dimensional arrays in JavaScript.  It includes a tutorial in case you are just trying to "get your head wrapped around" the concept and we'll also look at some useful tips for more advanced programmers. …
Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

728 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