Solved

open link in inline frame when you work in div

Posted on 2010-09-05
9
284 Views
Last Modified: 2012-05-10
hello,

i want to open a link in an inline frame

http://www.body-combat.net/v4/nl/tracklist.php

when i klick on an image, a new page underneath has to load.

my code is in a div, and opens each time a new window....

can someone help me? thx




<div id="scrollable" class="style27" style="left: 0px; top: -1px; width: 680px;">

    					<div class="navi"><p></p></div>

    					<a class="prev"></a>

    								<div class="items">

    								<a href="http://www.google.be" target="I1">est</a>

    					        					<a href="http://www.google.be" target="I1"><img src="http://www.body-combat.net/v4/images/BODYCOMBAT44.png" alt="text1" title="text2" width="130" height="176" /><span class="style26">bc 

													44</span></a>

													<a href="" target="I1"><img src="http://www.body-combat.net/v4/images/BodyCombat-43.png" alt="text1" title="text2" width="130" height="176" /><span class="style26">bc 

													43</span></a>

													<a href="" target="I1"><img src="http://www.body-combat.net/v4/images/bc42.png" alt="text1" title="text2" width="130" height="176" /><span class="style26">bc 

													42</span></a>

    					        					<a href="http://www.body-combat.net/tracklist/tracklist_body_combat_41.htm" target="I1"><img src="http://www.body-combat.net/images/bc_41_flyer.bmp" alt="text1" title="text2" width="130" height="176" /><span class="style26">bc 

													41</span></a>

													<a href="http://www.body-combat.net/tracklist/tracklist_body_combat_40.htm" target="I1"><img src="http://www.body-combat.net/images/bc40.jpg" alt="" title="" width="130" height="176" /><span class="style26">bc 

													40</span></a>

        				        					<a href="http://www.body-combat.net/tracklist/tracklist_body_combat_39.htm" target="I1"><img src="http://www.body-combat.net/images/BC_39_poster.jpg" alt="" title="" width="130" height="176" /><span class="style26">bc 

													39</span></a>

        				        					<a href="" target="I1"><img src="http://www.body-combat.net/images/flyer_release_38.jpg" alt="" title="" width="130" height="176" /><span class="style26">bc 

													38</span></a>

        				        					<a href="" target="I1"><img src="http://www.body-combat.net/images/bc_flyer_37_new.jpg" alt="" title="" width="130" height="176" /><span class="style26">bc 

													37</span></a>

        				        					<a href="" target="I1"><img src="http://www.body-combat.net/images/bc_36.PNG" alt="" title="" width="130" height="176" /><span class="style26">bc 

													36</span></a>

        				        					<a href="" target="I1"><img src="http://www.body-combat.net/images/NovemberBodyCombat.jpg" alt="text1" title="text2" width="130" height="176" /><span class="style26">bc 

													35</span></a>

													<a href="" target="I1"><img src="http://www.body-combat.net/images/bc_34.jpg" alt="" title="" width="130" height="176" /><span class="style26">bc 

													34</span></a>

													<a href="" target="I1">

													<span class="style26">bc 43</span></a>

        				        	</div>

Open in new window

0
Comment
Question by:fedkris
  • 5
9 Comments
 
LVL 108

Expert Comment

by:Ray Paseur
ID: 33606722
How have you applied the target attribute to the iframe?
0
 

Author Comment

by:fedkris
ID: 33606744

<td style="width: 764px">



<iframe id="I1" border="0" frameborder="0" name="I1" scrolling="no" style="width: 748px; height: 365px">

Your browser does not support inline frames or is currently configured not to display inline frames.

</iframe>



</td>

Open in new window

0
 
LVL 108

Assisted Solution

by:Ray Paseur
Ray Paseur earned 500 total points
ID: 33606903
Hmm... Not sure I understand what is wrong, but I can show you a teaching example of how to use iFrames in PHP and HTML.  Two scripts follow...

This is the script that runs the contents of the iframes.
<?php // RAY_iframe.php
error_reporting(E_ALL);

if (empty($_GET['n']))
{
    echo "NO IFRAME NUMBER SELECTED<br/>";
    die();
}

// WRITE SOME HTML INTO THE FRAMES
if ($_GET['n'] == '1')
{
    echo "SELECTED IFRAME NUMBER ONE<br/>";
    die();
}

if ($_GET['n'] == '2')
{
    echo "SELECTED IFRAME NUMBER TWO<br/>";
    die();
}

// SHOW THE SOURCE CODE FOR THIS SCRIPT
if ($_GET['n'] == '3')
{
    highlight_file(__FILE__);
    die();
}

Open in new window

0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 108

Accepted Solution

by:
Ray Paseur earned 500 total points
ID: 33606907
This is the HTML page that contains the iframes.

HTH, ~Ray
<?php // RAY_iframe.html ?>

<a target="frame_number_one" href="http://www.laprbass.com/RAY_iframe.php?n=1">SET FRAME ONE</a><br/>
<a target="frame_number_one" href="http://www.laprbass.com/RAY_iframe.php">CLEAR FRAME ONE</a><br/>
<br/>
<a target="frame_number_two" href="http://www.laprbass.com/RAY_iframe.php?n=2">SET FRAME TWO</a><br/>
<a target="frame_number_two" href="http://www.laprbass.com/RAY_iframe.php">CLEAR FRAME TWO</a><br/>


<!-- PUT UP SOME HTML TO DEFINE THE IFRAMES -->
<iframe name="frame_number_one" src="http://www.laprbass.com/RAY_iframe.php">one</iframe>
<br clear="all" />
<iframe name="frame_number_two" src="http://www.laprbass.com/RAY_iframe.php">two</iframe>
<br clear="all" />

<!-- SHOW THE PHP SCRIPT THAT RUNS THE IFRAMES -->
<a href="http://www.laprbass.com/RAY_iframe.php?n=3">CLICK HERE</a>

Open in new window

0
 
LVL 108

Expert Comment

by:Ray Paseur
ID: 33956874
Wow, this thing has been hanging around for a month and a half and now you want to delete it without comment or response?  What did I do wrong?  I provided tested and working code samples showing you how to accomplish your objectives.  

The question was, "i want to open a link in an inline frame."  If you simply install the code snippet I posted here and run them you can see how that is done.  Or you can test them on my web site - the URLs should be obvious from the code snippets posted above.

For the most part, we cannot write your code for you - that is what a developer would get paid to do - but in this case the answers and the examples are exactly responsive to the question.

Best regards, ~Ray
0
 
LVL 108

Expert Comment

by:Ray Paseur
ID: 33967065
These answer it:
ID:33606903
ID:33606907
0
 

Expert Comment

by:_alias99
ID: 34028165
All,
 
Following an 'Objection' by Ray_Paseur (at http://www.experts-exchange.com/Q_26560120.html) to the intended closure of this question, it has been reviewed by at least one Moderator and is being closed as recommended by the Expert.
 
At this point I am going to re-start the auto-close procedure.
 
Thank you,
 
_alias99
Community Support Moderator
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
PHP and Soap 3 27
Change month dropdown 5 15
Codiing Non-Existent Links 4 23
Showing data from 2 sql queries in one dropdown 8 10
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

707 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

12 Experts available now in Live!

Get 1:1 Help Now