Click to See Complete Forum and Search --> : refresh the other frame


eduac
09-13-2003, 10:42 AM
guys,

i want to make a page with two frames, one is the main and the other is the page refresh...like this example:

<html>
<head>
<title>Untitled</title>
</head>
<frameset cols="1%,*" framespacing="0" frameborder="0">
<frame src="refresh.htm" name="refresh">
<frameset rows="80%,*">
<frame src="msg.htm" name="main">
</frameset>
</frameset>
</html>

i want to know if is possible to make a javascript code that do the refresh in the frame (main) if the frame (refresh) have a new data ...(dont worry about the data, i have a php+mysql code for this).... it is possible?

Jona
09-13-2003, 06:02 PM
I don't know about "if there is new data" since it's a client-side script, you'd have to use PHP to check if it's new data, and then send different JavaScript code to the browser, I guess. But nevertheless, you'd use this to refresh the main page from the refresh page:


top.main.location.reload();


[J]ona

Charles
09-13-2003, 06:47 PM
You might do beter with

top.main.location.reload(true);

See http://devedge.netscape.com/library/manuals/2000/javascript/1.3/reference/location.html#1194198.

eduac
09-13-2003, 07:46 PM
it works!!! ...thanks a lot !!!!

Jona
09-13-2003, 08:52 PM
Originally posted by Charles
You might do beter with

top.main.location.reload(true);

See http://devedge.netscape.com/library/manuals/2000/javascript/1.3/reference/location.html#1194198.

Ah, nice one, Charles. :)

[J]ona