Refresh sub frame in frameset using javascript

Author Topic: Refresh sub frame in frameset using javascript  (Read 794 times)

Offline ngomaichiTopic starter

  • Trade Count: (0)
  • Newbie
  • *
  • Thank You 0
  • Posts: 5
  • Karma: 0
    • car racing games download for mobile
Refresh sub frame in frameset using javascript
« on: 07-20-2016, 02:48:49 »
I would like to refresh a sub frame after the submit button is clicked on a different page. I have this working for two frames in the same frameset but the top frame will not reset the menu frame or sabre frame? I have seen a few examples around but I'm not getting it.

Here is my code

"Index page"

<frameset frameborder="NO" framespacing="0" rows="60px,80%">
<frame name="top" id="top" src="./top.php" name="top" scrolling="no">
<frameset frameborder="NO" framespacing="0" cols="420px,70%">
<frame name="menu" id="menu" src="./menu.php">
<frame name="sabre" id="sabre" src="./sabre.php">
</frameset>
</frameset>
"The submit on the top page"

'<input onclick="parent.menu.menu_refresh()"
"javascript on menu page"

<script type="text/javascript">
function menu_refresh(){
setTimeout(
function()
{
window.location.reload();
}, 2000);
}
</script>
By the looks of it parent term in the submit button is not referring back to the right level and cant find the menu page. Like I said this works when refreshing sabre page from menu and vice versa, but not for top page to menu or sabre.
« Last Edit: 07-20-2016, 02:51:55 by ngomaichi »


 

Related Topics

  Subject / Started by Replies Last post
0 Replies
1091 Views
Last post 10-17-2011, 02:10:09
by manvbf
3 Replies
2042 Views
Last post 06-04-2015, 23:00:00
by MarcoLeitner
2 Replies
2110 Views
Last post 02-12-2016, 01:44:22
by Shikha Singh
2 Replies
1305 Views
Last post 05-25-2017, 05:01:11
by bidaddy
5 Replies
1062 Views
Last post 02-13-2017, 01:03:20
by amitkedia