php - Submitting form - using javascript -
i have page loops though 15,000 entries importing them in database. after each 50 entries user presented continue button.
<form name="contine" method="post" action="<?php echo $continue?>"> <input type="submit" name="submit" value="continue"></input> </form>
this works well, slows script down doesn't load server (nas drive running php4), , gets around php page timeout.
$continue
contains script name , current position of import, after submission page start there.
i'm trying user doesn't need sit there clicking continue after ever 50 entries. 15,000 in total it's lot of clicks.
i've tried using header('location: '.$continue.'/');
works if try importing around 3,000 entries, more , chrome complains looping.
so i'm hoping can replace input button javascript submit form me.
is possible , how ?
thanks :)
using plain js, submit form using (need add id="continue"
form):
document.forms["continue"].submit();
using jquery, can submit form using following code:
$('form[name="continue"]').submit();
Comments
Post a Comment