Auto submit

<SELECT class='select' NAME=\"op\">
<OPTION VALUE=\"PricingDel\">Pricing</SELECT><br />
<input type=\"submit\" value=\"AUTOSUBMIT\" class=\"button\">

Good day Team, I am looking to auto submit this button. I have a page review, after so many minutes, it goes to the delete page which has the function above, which I want to autodelete, the submit button auto clicks ??? thank you for any help

Maybe something like this? jQuery solution

  • (you need to give your button an id, or change the selector)
//set timer
setTimeout(autoSubmit, 2000);   // (2000 = miliseconds)

//click submit button progmatically 
function autoSubmit() { 
		 $('#submitBtn_ID').trigger('click');
	 }
});

Thank you very much for the feedback

I have set the following:

<SELECT class=‘select’ NAME=“op”>
<OPTION VALUE=“AnnoncesDel”>Pricing

<input type=\"submitBtn_ID\" value=\"CANCEL NOW\" class=\"button\">
<input type=\"hidden\" name=\"valid\" value=\"Yes\">
<input type=\"hidden\" name=\"lid\" value=\"$lid\">
<input type=\"hidden\" name=\"date\" value=\"$date$time\">
<input type=\"hidden\" name=\"submitter\" value=\"$submitter\">";

function autoSubmit() { 
	 $('#submitBtn_ID').trigger('click');
 } });

seems to not work…

" submitBtn_ID"

is NOT a button type. You need to add that as an ID.

Your original button/code:

<input id=\"submitBtn_ID\" type=\"submit\" value=\"AUTOSUBMIT\" class=\"button\">

Thank you whispers, I was able to solve the problem by auto submit the actual form instead of the button. Thanks again for all

Are you not doing any validation or anything? (That would norm,ally be triggered upon submit button clicking?)

Sponsor our Newsletter | Privacy Policy | Terms of Service