views:

30

answers:

2

hi

below is my main page html

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Page_1.htm</title>
</head>
<body>
<a href="#My_iframe_Link">Click me</a>
<br></br>
<br></br>
<br></br>
<br></br>
<br></br>
<br></br>
<br></br>
<br></br>
<br></br>
<br></br>
<br></br>
<br></br>
<iframe name="I1" frameborder="0" scrolling="no"  src="Page_2.htm" width="910" height="221">

<a name="My_iframe_Link" href="#">Hi, How R u ?</a>

</ifrmae
</body>
</html>

In the clicking of <a href="#My_iframe_Link">Click me</a> i wand to move to the position inside iframe to the position <a name="My_iframe_Link" href="#">Hi, How R u ?</a>

How i do this?

+2  A: 

add a target:

<a href="#My_iframe_Link" target="I1">Click me</a>

You might need to set the id of the iframe to I1 as well.

Marius
But the problem, iframe is refresh with the page_1.htm
Alex
A: 

I don't think you can use the <iframe> in this way. You need to refer to an entire HTML document with using the "src" attribute, not include markup chunks as child elements of the tag. The anchor you have should be in your other document.

Robusto