Form submit multiple times

rudeboi

Newbie
Joined
Nov 8, 2008
Messages
28
Reaction score
34
Hello guys,

I have a php online form that also uses java. When you click submit it sends away all the inputted information from the page.

I would like to know how I can make it submit this information again and again and again when the submit button is pressed.

As many times a second as possible, the more the better.

As a follow on from that maybe I can add a selection for how many times and how long I want the form to submit for.

For example:

Submit form 50 times a second for 20 minutes when submit button is pressed!
 
It's gona be tricky but AJAX or Javascript should be able to do it but not very quietly...
 
JS

Code:
var sendThatForm = function(){
    document.getElementById('myFormId').submit();
    setTimeout(sendThatForm,20);
};
and in you html add onsubmit to the form

Code:
<form onsubmit="sendThatForm(); return false;">
 
Should be an easy task to archive
Just modify the file your visitors are sent to on submit, and have it loop a few extra times.

Can't give you any 100% working solution without the source code tho :)
Code:
<form name="htmlform" method="post" action="loop.php">
 
You forgot about target - when form is submited first time, your JS script is stopped.
So use the following target:
Code:
<form name="htmlform" method="post" action="loop.php" target="page2">
 
You forgot about target - when form is submited first time, your JS script is stopped.
So use the following target:
Code:
<form name="htmlform" method="post" action="loop.php" target="page2">

Oh, my quoted code was just as an example. I'm not sure why you would like to use JS at all TBH.
I meant that the loop can be created in PHP at the page that handles the action.
 
With PHP you can make a CURL to send the information... It'll use less time.
 
Hello

Please user for loop .

in this for loop you have to enter value multiple time. if not add then you then user for loop in ajax. both are working.

Regad
Vaghela Dev
 
Back
Top