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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.