Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] Auto-submit form every X minutes
- From: paul at juniperwebcraft.com (Paul Novitski)
- Subject: [Javascript] Auto-submit form every X minutes
- Date: Tue Jan 30 11:33:23 2007
At 1/30/2007 09:01 AM, Alan Easton wrote:
>I am wanting to auto-submit a form every x mins. I have the following code.
>
><script type="text/javascript">
>function reFresh() {
> document.form.submit();
>}
>window.setInterval("reFresh()",10000);
></script>
>
>However, this is an ASP page, and I have 4 submit buttons, each
>performing different actions on the page. The page gets submitted to
>itself, and I grab the name of each button and perform something different.
>
>I would like to simply add a auto-save, so is there anyway I can use
>JS to auto submit one of those buttons that I already have, like
>instead of it being clicked, it is captures in an onsubmit event or something.
I suppose you could invoke the click() method on the button of your choice.
http://developer.mozilla.org/en/docs/DOM:element.click
Also don't forget you can create and modify hidden input elements on
the fly to feed whatever values you need to the server on submit.
http://www.w3.org/TR/html4/interact/forms.html#hidden-control
Regards,
Paul
__________________________
Juniper Webcraft Ltd.
http://juniperwebcraft.com
- Follow-Ups:
- [Javascript] Auto-submit form every X minutes
- From: Alan Easton
- [Javascript] Auto-submit form every X minutes
- References:
- [Javascript] Auto-submit form every X minutes
- From: Alan Easton
- [Javascript] Auto-submit form every X minutes
- Prev by Date: [Javascript] Auto-submit form every X minutes
- Next by Date: [Javascript] is their a javascript function, or DOM property to find the char limit of a table cell or div?
- Previous by thread: [Javascript] Auto-submit form every X minutes
- Next by thread: [Javascript] Auto-submit form every X minutes
- Index(es):