PDA

View Full Version : Show the content of link in a iframe


bladu
06-03-2008, 09:51 AM
Hi guys!

I need to show the content of a html link (<a href>) in an iframe placed into div tags, hiding the content between the divs when I click the link .
I do the following :

heading.html


<a href="http://maps.google.es target="centre">Where are </a>


index.html

<div id="centre">
<iframe src="../html/heading.html" name="centre"> -->
<form action="../Fillm" method="post">
...
</form>
</iframe>
</div>


But the page appears me duplicated, one above and the other page behind this one, and when I click the link, the content appears me in the behind page.

I would be grateful if somebody could help me, because I am Stuck.

Bye

cancer10
06-03-2008, 12:12 PM
Try the following


<a href="http://maps.google.es target="centre">Where are </a>

<iframe src="../html/heading.html" name="centre">
</iframe>

bladu
06-03-2008, 03:21 PM
Try the following


<a href="http://maps.google.es target="centre">Where are </a>

<iframe src="../html/heading.html" name="centre">
</iframe>


Hi Cancer!
I have tried you said but it doesn`t work as I want.
Because the google map appears between an empty gap belonging to the div and the content of the form.

_Aerospace_Eng_
06-03-2008, 03:52 PM
You can't have id="centre" on the div and name="centre" on the iframe or it won't work. Remove id="centre" on the div. And your code is incorrect. You have this
<a href="http://maps.google.es target="centre">Where are </a>
It should be this
<a href="http://maps.google.es" target="centre">Where are </a>
Notice the added quote.