Open in the same windows Ifame


Well-known member
I have this php file which pulls from my datebase

$cdb = new PDO('mysql:dbname=xxx;host=localhost', 'xxx', 'xxx');

foreach ($cdb->query("SELECT * FROM images ORDER BY posted DESC LIMIT 3") AS $img)

$twofirst = substr($img['hash'], 0, 2);
    echo '
                <a style="position: relative; display: block; height: 140px;" href="/booru/post/view/' . $img['id'] . '" target="_blank">

                    <img src="booru/timthumb.php?src=images/' . $twofirst . '/' . $img['hash'] . '&h=125&w=125&q=100" width="125px" style="border-style: none"/>


And in the xenforo template is as follows

  <div class="section">
    <div class="secondaryContent">
            <h3>New Cosplays</h3>
              <iframe marginwidth="0" marginheight="0" width="125px" height="400px" scrolling="no" frameborder=0 src="image.php">
Is there a better way I can get this to work?
If I don't add the
It just opens the page in the Iframe which is 100% fail

Thanks for your time.


XenForo moderator
Staff member
I think he wants it to open in a new tab/page, but without using target=blank.


Well-known member
Hmm I'll give it ago. But is that not for loading overlays and "click to show AJAX" am after it been loaded all the time without click but I guess some of the code could be changed


Doh there is more than one video I'll watch the rest my bad..
The second video shows how to load another page into the current page using the ContentLoader class.


Well-known member
Just a small update if anyone else the same problem, I asked on stackoverflow and someone said to change the _blank to _top and it works :) woot