Click to See Complete Forum and Search --> : javascript routine assisting CGI/frames


Dfenestr8
11-22-2003, 12:31 PM
Hi.

I'm trying to build a page that has two frames, both of which are generated by a different cgi script.

The lower frame is generated by a script called "control.py".

The upper frame is generated by a script called "getchat.py".

On the lower frame, there is a button called "REFRESH". When clicked, I want it to be able to read information in a hidden input on a form in the
upper frame, that being .....


<input type=hidden NAME="last_seen" value = "[something]">


... and submit that information to getchat.py.

I have a javascript routine worked out which *usually* does that when I view the page with konqueror. Usually. It also never seems to work with mozilla. Can anybody tell me why? And better still, how I can fix it?

Here's the code generated by control.py ......

In the <head> i have ....


<script language = "javascript">
<!-- hide from older browsers

function refreshPosts()
{
plast = parent.chatframe.form1.last_seen.value;
parent.chatframe.location ='getchat.py?last_seen=' + plast
}

//-->
</script>


And on the form in the lower frame, I have this input ......


<input type = "button" value = "REFRESH" onClick = "refreshPosts()">


Thanx in advance.