Solved

iFrame link

Posted on 2008-10-27
2
226 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Showing your events from Google Calendar in Google Maps Why? I travel all week and I thought it would be ideal if staff in office knew where I was based on my calendar. (OK real reason: my son wanted to see where I would be working, and I thoug…
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
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 …

786 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