php - Submit a form multiple times in loop -


how can submit form multiple times in loop.

what trying post post data 3rd party api sms. 3rd party sms gateway takes 50 no. in 1 go , have more 50 mobile no.

for (int jj=0;jj<=5; jj++) { %>  <form name="f" id="ff" action=http://smswebsite.com/api.php  >  <input type=text name=username value="amu" >   <input type=text name=password value="password" >  <input type=text name=source value="senderid">  <input type=text name=dmobile value="917417010049" >  <input type=text name=message value="testing hashmi, malik hayat"  >   </form>  <script type="text/javascript">       document.getelementbyid("ff").submit();     </script> <% } %> 

please help

what issue having???? 3 problems see

  1. if first time form submitted page navigate away. next form may not turn submitted.
  2. i have noticed form id remains same, there multiple forms same id each time loop executed. append jj counter value form tag id "ff"+jj , javascript getelementbyid("ff"+jj). use ajax post form page may not navigate away.
  3. call ajax post when document read event executed: because might submitting form page may not have been rendered yet.

    $( document ).ready(function() { // code submit form through ajax });


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -