irkevin Posted October 17, 2007 Share Posted October 17, 2007 hello peeps.. I have a shoutbox on my website, it's in an iframe.. and now i have a refresh button in it, basically, when i hit the refresh button, it should refresh only whats inside the iframe.. it's working great it IE, but in firefox, it refresh the whole page.. why is it so? here's the code im using with this refresh button <input type="button" value="Reload" onClick="javascript:history.go(0);" class="submit"> Can someone tell me how to prevent it from refreshing the whole page? it only happen in FF Link to comment https://forums.phpfreaks.com/topic/73589-solved-refresh-button-refresh-the-whole-page-instead-of-the-contents-in-iframe/ Share on other sites More sharing options...
emehrkay Posted October 17, 2007 Share Posted October 17, 2007 give the iframe and id and do document.getElementById('iframe').history.go(0); Link to comment https://forums.phpfreaks.com/topic/73589-solved-refresh-button-refresh-the-whole-page-instead-of-the-contents-in-iframe/#findComment-371311 Share on other sites More sharing options...
irkevin Posted October 17, 2007 Author Share Posted October 17, 2007 where do i add that code? i mean, how do i proceed with it? sorry to bug you like this, im very very new to javascript.. Link to comment https://forums.phpfreaks.com/topic/73589-solved-refresh-button-refresh-the-whole-page-instead-of-the-contents-in-iframe/#findComment-371313 Share on other sites More sharing options...
irkevin Posted October 17, 2007 Author Share Posted October 17, 2007 Looks like this section is quite silent Link to comment https://forums.phpfreaks.com/topic/73589-solved-refresh-button-refresh-the-whole-page-instead-of-the-contents-in-iframe/#findComment-371325 Share on other sites More sharing options...
darkfreaks Posted October 17, 2007 Share Posted October 17, 2007 solution: <iframe src="shoutbox/index.php" id="document.getElementById('iframe').history.go(0);" name="shout" width="100%" frameborder="1" marginheight="0" marginwidth="0" scrolling="yes"></iframe> Link to comment https://forums.phpfreaks.com/topic/73589-solved-refresh-button-refresh-the-whole-page-instead-of-the-contents-in-iframe/#findComment-371342 Share on other sites More sharing options...
irkevin Posted October 17, 2007 Author Share Posted October 17, 2007 so it's working here's the code onClick="document.location.reload(true) and here it's how i'm using it in a button <input type="button" value="Refresh" onClick="document.location.reload(true)" class="submit"> Thanks for the help darkfreaks Link to comment https://forums.phpfreaks.com/topic/73589-solved-refresh-button-refresh-the-whole-page-instead-of-the-contents-in-iframe/#findComment-371352 Share on other sites More sharing options...
darkfreaks Posted October 17, 2007 Share Posted October 17, 2007 welcome lil buddy Link to comment https://forums.phpfreaks.com/topic/73589-solved-refresh-button-refresh-the-whole-page-instead-of-the-contents-in-iframe/#findComment-371373 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.