Jump to content

[SOLVED] iframe links and php


redarrow

Recommended Posts

Advance thank you.

 

 

goes like this

 

iframe pulls the page in.

 

the page it pulling in has links.

 

need to get those links to work so the iframe dosent add it to it own page.

<?php
echo"<center><iframe STYLE='
background-color: #3366ff;
scrollbar-base-color:#3366ff;
scrollbar-face-color:#3366ff;
scrollbar-arrow-color:#3366ff;'
src='show_profile_on_podcast_page.php' target='_top' width='200px' height='190'>
  <p>Your browser does not support iframes.</p>
</iframe></center>";
?>

 

 

 

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/149595-solved-iframe-links-and-php/
Share on other sites

What you want to do is to name your iframe.

 

<?php
echo"<center><iframe name="TheIFrameNameGoesHere" STYLE='
background-color: #3366ff;
scrollbar-base-color:#3366ff;
scrollbar-face-color:#3366ff;
scrollbar-arrow-color:#3366ff;'
src='show_profile_on_podcast_page.php' target='_top' width='200px' height='190'>
  <p>Your browser does not support iframes.</p>
</iframe></center>";
?>
</iframe>

 

If you have a link inside the iframe on the iframe's main page, your link would look like this.

 

<a target="TheIFrameNameGoesHere" href="yourlinkhere.php">Testing</a>

 

Hope this helps ;)

 

Edit: Oops you want on the outside of the iFrame? :P

 

_Parent should work.

 

<a target="_parent" href="yourlinkhere.php">Testing</a>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.