Jump to content

open string in iframe on another page


boemboem

Recommended Posts

I have found this, but it isn't working properly. it does target to the Iframe, but doens´t open the part after the question mark (?)

?http://www.coldcharlie.nl/phpbb/viewtopic.php?t={$topic['topic_id']}\">

 

Head section in include_forum.php

<script type="text/javascript">
function loadframe(){
if(window.location.replace)
window.frames.DaFrame.location.replace(get('framepage'));
else
window.frames.DaFrame.location.href=get('framepage');
}
function get(key_str) {
var query = window.location.search.substr(1);
var pairs = query.split("&");
for(var i = 0; i < pairs.length; i++) {
var pair = pairs[i].split("=");
if(unescape(pair[0]) == key_str)
return unescape(pair[1]);
}
return null;
}
if (location.search&&get('framepage')!=null)
if ( typeof window.addEventListener != "undefined" )
    window.addEventListener( "load", loadframe, false );
else if ( typeof window.attachEvent != "undefined" )
    window.attachEvent( "onload", loadframe );
else {
    if ( window.onload != null ) {
        var oldOnload = window.onload;
        window.onload = function ( e ) {
            oldOnload( e );
            loadframe();
        };
    }
    else
        window.onload = loadframe;
}
</script>

 

The Iframe on include_forum.php

<iframe id="Daframe" name="myframe" src="/phpbb/index.php" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" width="977" align="middle"></iframe>

This is the part with the link in it on recent-topics.php

<td><a href=\"include_forum.php?http://www.coldcharlie.nl/phpbb/viewtopic.php?t={$topic['topic_id']}\">{$topic['topic_title']}</a></td>

 

 

Any help would be great!

Link to comment
https://forums.phpfreaks.com/topic/146119-open-string-in-iframe-on-another-page/
Share on other sites

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.