FMWebschool Posted April 14, 2003 Posted April 14, 2003 I have formatted a page to submit several forms with one submit at the same time or rather sequentially. I have seen solutions utilizing Javascript to make this possible using a loop to submit the forms one after the other and have coded my page with their suggestions, however I cannot get it to work. Does anyone have any suggestions? <script language="JavaScript"> <!-- function editMe(){ var f=document.forms; var processed=0; var rangesize=[FMP-RangeSize]; var size=1+[FMP-RangeSize]; for (s=0;s,size; s++){ f.submit(); time(1); }alert("Please Wait"); }function time(t){ var timme=t+1; setTimeout('refresh()';timme) } //--> function completed(){ window.location="[FMP-Link: sa]&-format=done2.html&-findall"; } </script> <form action="FMPro" method="post" name="controls[FMP-CurrentRecid]" target="frame[FMP-CurrentRecid]"> <input type="hidden" name="-db" value="Surveys.fp5"> <input type="hidden" name="-lay" value="PlainView"> <input type="hidden" name="-format" value="done.html"> <input type="hidden" name="Candidate_id" value="[FMP-CurrentToken:7]"> <input type="hidden" name="Job_order_id" value="[FMP-CurrentToken:1]"> <tr> <td class="fieldclass" width="25">[FMP-CurrentRecordNumber]</td> <td class="fieldclass">[FMP-Field:Question]</td> <td class="fieldclass" width="100"> <select name="Answer"> [fmp-valuelist:valuelist, List=Level] <option>[fmp-valuelistitem] [/fmp-valuelist] </select> <input type="hidden" name="-new"> </td> </tr> </form> <iframe name="frame[FMP-currentRecid] id="frame[FMP-CurrentRecid]" height="0" width="0"></iframe> <a href="#" onClick="editMe();"><img src="Images/Enter_btn.gif" alt="" height="23" width="83" border="0"></a>
Garry Claridge Posted April 14, 2003 Posted April 14, 2003 I've just tried this, it seems to work for me: <head> <script> function subForms() { nAllForms = document.forms.length; for (i=0;i<nAllForms;i++) { document.forms[i].submit(); }; } </script> </head> <body>Hello World [FMP-Record] <form action="http://localhost:1154/FMPro" method="post" name="controls[FMP-CurrentRecordNumber]" target="frame[FMP-CurrentRecordNumber]"> <input type="hidden" name="-db" value="combotest.fp5"> <input type="hidden" name="-lay" value="web"> <input type="hidden" name="-format" value="hworld2.html"> <input type="hidden" name="Candidate_id" value="[FMP-CurrentToken:7]"> <input type="hidden" name="Job_order_id" value="[FMP-CurrentToken:1]"> <select name="name"> <option>Yes <option>No </select> <input type="hidden" name="-new"> </form> <iframe name="frame[FMP-CurrentRecordNumber]" id="frame[FMP-CurrentRecordNumber]" height="0" width="0"></iframe> [/FMP-Record] <a href="#" onClick="subForms();">Submit</a> </body> All the best. Garry
FMWebschool Posted April 14, 2003 Author Posted April 14, 2003 Thanks Garry, I will give it a run through Been up typing all night In Kindness Stephen
FMWebschool Posted April 15, 2003 Author Posted April 15, 2003 Garry, Thank you again. I just tried the code and it works perfectly. In kindness, Stephen
Recommended Posts
This topic is 7922 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now