I am working with a database (FileMaker) which is a single threaded database and only allows creation or editing of a single record at a time. My html page displays a set of records, one record to a row, each with it's own form. The form allows the user to enter a value and creates a new record.
I have heard of others using a loop with javascript to submit multiple forms one after the other and have coded my page with their suggestions, however I cannot get it to work.
<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=http://www.webdeveloper.com/forum/archive/index.php/"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>
I have heard of others using a loop with javascript to submit multiple forms one after the other and have coded my page with their suggestions, however I cannot get it to work.
<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
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=http://www.webdeveloper.com/forum/archive/index.php/"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>