8 frames with 8 forms

M

Milton Snider

I have a frameset with 8 frames which refreshes itself every minute. Each
frame has a form which has one textbox which allows us to explain where we
are during the day or for all day. Each frame and each form represents one
of us. Each frame has a form which submits to another asp page which does
the recordset update and then changes the frame location back to the
origonal location. This works fine except that I would like to halt the
auto refresh when someone is typing in one of the forms. I tried using
session variables but soon realized there is no apparent way to update a
session variable from a client script, or at least I was not able to do it.
So how can i halt the refresh process when someone is typing in a text box?
Any suggestions?
thanks
(e-mail address removed)
 
J

Jim Buyens

Add the following onload= attribute to the <body> tag of
each forms page:

onload="timerid =
setTimeout("document.reload(true);",60000);"

and then add this attribute to the HTML for each text box:

onfocus="clearTimeout(timerid);"

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 
J

Jon

I think he'd want
setInterval('document.reload(true);',60000);"
ie refresh the page every minute - setTimeout waits a minute then refreshes
the page once.

Jon
Microsoft MVP - FP
 
M

Milton Snider

I created a page with a simple form with text box and tried the setInterval
code as follows: I did not put in the onfocus() code yet. I assume I set
it to 10 seconds. I get an error:
line 1
char 1
"object doesn't support this property or method."
What am I doing wrong?

<html>
<head>
<title>test</title>
</head>

<body onload="timerid=setInterval('document.reload(true);',10000);">
<form method="POST" action="">
<input type="text" name="time1" size="20"><input type="submit"
value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
</form>

</body >

</html>
 
J

Jim Buyens

Jon said:
I think he'd want
setInterval('document.reload(true);',60000);"
ie refresh the page every minute - setTimeout waits a minute then refreshes
the page once.

Jon
Microsoft MVP - FP

No, each new copy of the page starts its own timer.

Or, from another point of view, the second timer event would never
occur unless the document.reload stalled for over sixty seconds.

However, there *is* another error. The <body> tag should contain:

onload="timerid = setTimeout('document.location.reload(true);',60000);"

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 
J

Jon

Hi Milton,
you'd want
<body onload="timerid=setInterval('location.reload(true);',10000);">
or
<body
onload="timerid=setInterval('document.location.reload(true);',10000);">

both do the same thing

Jon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top