Solved

open link in inline frame when you work in div

Posted on 2010-09-05
9
323 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
9 Comments
 
LVL 110

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 110

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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 110

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 110

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 110

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Obsolete font tag need to convert to CSS 3 33
HTML5 storage and web apps 11 44
What cart is this? 2 33
Hit counters in SharePoint 2013 2 22
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

735 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