Solved

iFrame link

Posted on 2008-10-27
2
225 Views
Last Modified: 2012-05-05
Should be simple issue here, but cant find out what Im doing wrong!

Ive got a simple iframe which when the user click on a link, the iframe changes to that.

Using a frame is easy, and I thought that iFrame is the same, but obviously not.

Any ideas where Im going wrong here?
<body>

<a href="http://www.google.co.uk" target="ifraBody">google</a><br />

<a href="http://www.bbc.co.uk" target="ifraBody">bbc</a><br />

<a href="http://www.hotmail.co.uk" target="ifraBody">hotmail</a><br />
 

<div id="divBody">

	<iframe id="ifraBody" src="body.php"></iframe> 

</div>

</body>

Open in new window

0
Comment
Question by:tonelm54
2 Comments
 
LVL 3

Assisted Solution

by:siranm
siranm earned 100 total points
ID: 22817371
i don't know if you can use iframes as a normal frame....

but i guess you could use onclick event and write


<a href="http://www.bbc.co.uk" onclick="    document.getElementById('ifraBody').src = this.href;    ">bbc</a><br />



or something similar....
0
 
LVL 39

Accepted Solution

by:
Roger Baklund earned 400 total points
ID: 22817398
Try this:
<iframe id="ifraBody" name="ifraBody" src="body.php">

Open in new window

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Bootstrap css to change alignment without using padding 3 49
Adding a Li to a UL after a specified Li contents 2 42
.php tree directory? 5 55
Split in Javascript 5 30
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now