boemboem Posted February 20, 2009 Share Posted February 20, 2009 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 More sharing options...
boemboem Posted February 20, 2009 Author Share Posted February 20, 2009 If you need more information please ask. Link to comment https://forums.phpfreaks.com/topic/146119-open-string-in-iframe-on-another-page/#findComment-767100 Share on other sites More sharing options...
boemboem Posted February 23, 2009 Author Share Posted February 23, 2009 does nobody have an idea? Link to comment https://forums.phpfreaks.com/topic/146119-open-string-in-iframe-on-another-page/#findComment-769004 Share on other sites More sharing options...
RichardRotterdam Posted February 23, 2009 Share Posted February 23, 2009 If you can use php why not use that instead? Here is an example main page <?php $data="hello iframe"; ?> <iframe src="frame.php?data=<?php echo $data;?>"></iframe> iframe <?php echo $_GET['data']; ?> Link to comment https://forums.phpfreaks.com/topic/146119-open-string-in-iframe-on-another-page/#findComment-769009 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.