Jump to content

iFrames Help


Recommended Posts

Well you could use JavaScript.

<script type="text/javascript">function changeFrame(){ document.getElementById('iframe1').src="NEW LOCATION"}</script><a href="java script:changeFrame()">The link</a><iframe src="SOME URL"id="iframe1"></iframe>

Link to post
Share on other sites
Well you could use JavaScript.
<script type="text/javascript">function changeFrame(){ document.getElementById('iframe1').src="NEW LOCATION"}</script><a href="java script:changeFrame()">The link</a><iframe src="SOME URL"id="iframe1"></iframe>

With that code, where do i put the link that it changes to?AlsoIll try and explain better.On the site there is the navigation, and the content shows in an iFrame in a different section. So I want to be able to click the link on the navigation and the iFrame changes to the content that that link would showWhat are table designs?If you could post a link that would help alot
Link to post
Share on other sites

A much simpler method would be to use the target attribute in your links and a name attribute in the iframe:

<iframe name="MyFrame" src="default.asp"></iframe><ul><li><a href="http://www.w3schools.com/" target="MyFrame">W3 Schools</a></li><li><a href="http://www.google.com/" target="MyFrame">Google</a></li></ul>

Link to post
Share on other sites
A much simpler method would be to use the target attribute in your links and a name attribute in the iframe:
<iframe name="MyFrame" src="default.asp"></iframe><ul><li><a href="http://www.w3schools.com/" target="MyFrame">W3 Schools</a></li><li><a href="http://www.google.com/" target="MyFrame">Google</a></li></ul>

Thanks for thatit works :)
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...