473,322 Members | 1,347 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Javascript to post a form automaticaly ?

Hello there,

I'm just wondering something. I did a form on a page, form which contains already some values. Is it possible to do a script that posts the form automaticaly after X seconds ?

Thanks a lot :-)

Cyrille
Feb 13 '07 #1
4 1247
iam_clint
1,208 Expert 1GB
for example.
Expand|Select|Wrap|Line Numbers
  1. <script>
  2. timeout = window.setTimeout("document.getElementById('formsid').submit()", 3000);
  3. </script>
  4. <form id="formsid" method="get" action="blah">
  5. </form>
  6.  
  7.  
change 3000 to whatever time u want
1000 = 1 second
2000 = 2 seconds
3000 = 3 seconds ect...
Feb 13 '07 #2
dmjpro
2,476 2GB
u can also using window.setInterval(fun_ref,mill_secs) instead of using window.setTimeout
Feb 14 '07 #3
iam_clint
1,208 Expert 1GB
the problem with setinterval is it could fire again before it finishes posting the data

Difference between setTimeout and setInterval is that setInterval calls the function over and over again untill you tell it to stop and setTimeout only calls the function once.
Feb 14 '07 #4
acoder
16,027 Expert Mod 8TB
Yes, see this page.
Feb 14 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Daniel | last post by:
how to change the value of Request.ServerVariables on the ser ver? if not possible is there some way to change it by sending back javascript to the client and having the client automaticaly do...
1
by: Vladimir O¾ura | last post by:
I am building a Pocket PC application in C#. I have 5 forms (1 main and 4 sub forms). The main form must always load first. The sub forms are loaded from the main form. The application is run...
6
by: subhashkumar | last post by:
Running data Append to a table Dear All, I need a help from this forum, I was developing a small tools for stock market. I get stuck when trying to save the running changes in a data field...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.