I have a page with a frame in it, and some links below the frame.
I want the links, when clicked, to open the page in the frame.
I tried <a href="" target="nameofframe">link1</a>
but it didnt' work?
update its an iframe.
I have a page with a frame in it, and some links below the frame.
I want the links, when clicked, to open the page in the frame.
I tried <a href="" target="nameofframe">link1</a>
but it didnt' work?
update its an iframe.
Assuming the iFrame has a name attribute of "myIframe":
<a href="http://www.google.com" target="myIframe">Link Text</a>
You can also accomplish this with the use of Javascript. The iFrame has a src attribute which specifies the location it shows. As such, it's a simple matter of binding the click of a link to changing that src attribute.
Try this:
< iframe name="iframe1" src="target.html"></iframe >
< a href="link.html" target="iframe1">link</a >
The "target" attribute should open in the iframe.
Edited to fix formatting.