Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

open link in inline frame when you work in div

Posted on 2010-09-05
9
Medium Priority
?
351 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 111

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 111

Assisted Solution

by:Ray Paseur
Ray Paseur earned 2000 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 111

Accepted Solution

by:
Ray Paseur earned 2000 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 111

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 111

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

721 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