Solved

open link in inline frame when you work in div

Posted on 2010-09-05
9
330 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
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
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…

738 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