I am attempting to have a link load an article from my domain in to an iframe. I understand that it is usually easy to link using:
<a href="#" onClick="window.open('');return false">Google</a>
But when it es to Iframes I am having difficulty formatting the code correctly so that it will display inside the iframe.
I can not use:
<a href="" target="your_frame_name">Google</a>
Because I need to use an onClick so I can execute more than one mand.
I have tried iterations of:
<A HREF="#" onclick="window.framename.location='page.htm';">text</A>
<A HREF="#" onClick="window.open('your url', 'frameName'); return false">text</a>
<A HREF="#" onclick="document.framename.location.href='page.htm'; return false">text</a>
and none of them are doing anything.
Thank you in advance,
Spence
I am attempting to have a link load an article from my domain in to an iframe. I understand that it is usually easy to link using:
<a href="#" onClick="window.open('http://www.google.');return false">Google</a>
But when it es to Iframes I am having difficulty formatting the code correctly so that it will display inside the iframe.
I can not use:
<a href="http://www.google." target="your_frame_name">Google</a>
Because I need to use an onClick so I can execute more than one mand.
I have tried iterations of:
<A HREF="#" onclick="window.framename.location='page.htm';">text</A>
<A HREF="#" onClick="window.open('your url', 'frameName'); return false">text</a>
<A HREF="#" onclick="document.framename.location.href='page.htm'; return false">text</a>
and none of them are doing anything.
Thank you in advance,
Spence
use link and do what ever you want to do in onclick event
<a href="http://www.google." target="your_frame_name" onclick="executeOnClick()">Google</a>
<script type="text/javascript">
function executeOnClick(){
// add your logic here
return true;
}
</script>