try this

<script>
var d1 = new Date();
var maxlim = 100000;
function runtimer()
{
        var d = new Date();
        var c = d - d1;
        if(c>maxlim)
        {
                document.formname.submit();
        }
        setTimeout("runtimer()",1000);
}
</script>

you have to call this script in the body tag using the onLoad keyword
<body onLoad="runtimer()">

here variable is used to store the date when the form was loaded.
and i think you can make out the rest.
if not, just lemme know.
Asif

> -----Original Message-----
> From: Steve Downie [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 29, 2002 5:49 AM
> To: [EMAIL PROTECTED]
> Subject: Force a form submission via timer?
>
>
> Does anyone have a way to force a form submission upon a timer
> expiration?
>
> I am trying to have questionnaire type forms submitted,
> either when the
> user actually presses a submit button or when a preset timer count
> expires. Upon the timer expiration, I would like the form parameters
> submitted which were entered by the user in the current form up to the
> expiration point of the timer.
>
> I've tried a few ways to accomplish this  using Timer and
> TimerTask, but
> I've yet to come up with the results I need.
>
> TIA for any and all suggestions.
>
> Regards,
>
> --Steve Downie
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to