Post by Former Member on Jan 31, 2011 15:01:12 GMT -8
I seem to have a problem with an iFrame. This is quite different from how a regular iFrame works on many sites. I need it to where when someone clicked on the link, it opens in a different window/tab. It used to open up in a different window/tab, but now it wont.
The site in question: idirectory.us Now if you go to the affiliate bar at the bottom of the page, it's in an iFrame. I have it this way, so that others can use it too, like this: www.support.idirectory.us/ at the bottom of the forum it also shows the affiliate bar. This would be the code to put on Forums or sites:
This is what is in the JS File:
and this is what's in the PHP file:
There is obviously more to the PHP file with Database's etc. But I wont reveal those parts, as it's irrelevant, as it's Database info.
As you can see in the PHP part I did search google, and found the "target="_top"" But it doesn't work.
If you know the solution please help me! Thanks.
The site in question: idirectory.us Now if you go to the affiliate bar at the bottom of the page, it's in an iFrame. I have it this way, so that others can use it too, like this: www.support.idirectory.us/ at the bottom of the forum it also shows the affiliate bar. This would be the code to put on Forums or sites:
<script type="text/javascript">
var width = 700;
document.write("<scr"+"ipt type='text/javascript' src='http://www.idirectory.us/bannerad/js/700wide.js'></scr"+"ipt>");
</script>
This is what is in the JS File:
var width;
document.write('<center>');
document.write('<table width="'+ width +'" height="80px" border="1" cellpadding="0" cellspacing="1">');
document.write('<tr>');
document.write('<td colspan="2">');
document.write('<center>Affiliate bar powered by <a href="http://www.idirectory.us">iDirectory</a> - <a href="http://www.idirectory.us/affbar.php">Get your affiliate bar now!</a> - <script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="http://www.facebook.com/pages/iDirectory/109915605694626?ref=ts" layout="button_count" show_faces="false"></fb:like></center>');
document.write('</td>');
document.write('</tr><tr>');
document.write('<td valign="top">');
document.write('<iframe src="http://www.idirectory.us/bannerad/function/700wideF.php" width="100%" height="43" frameborder="0" border="0" cellspacing="0" scrolling="no"></iframe>');
document.write('</td>');
document.write('</tr>');
document.write('</table>');
document.write('</center>');
and this is what's in the PHP file:
echo "<marquee onmouseover=\"this.stop()\" onmouseout=\"this.start()\">";
while($row = mysql_fetch_assoc($rand_item)) {
echo "<a href=\"$row[url]\" /><img src=\"$row[image]\" border=\"0\" target=\"_top\"></a> ";
}
echo "</marquee>";
There is obviously more to the PHP file with Database's etc. But I wont reveal those parts, as it's irrelevant, as it's Database info.
As you can see in the PHP part I did search google, and found the "target="_top"" But it doesn't work.
If you know the solution please help me! Thanks.