X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Fprogress-init.html;h=ec485f43877aea45e070efb7158d96d8cd536310;hb=c1bc54f7523d2af6114d7445bbbe5618f1429794;hp=fb408400a86dea25afc9042138468ee35a2e9599;hpb=673b9a458d9138523026963df6fa3b4683e09bae;p=freeside.git diff --git a/httemplate/elements/progress-init.html b/httemplate/elements/progress-init.html index fb408400a..ec485f438 100644 --- a/httemplate/elements/progress-init.html +++ b/httemplate/elements/progress-init.html @@ -12,8 +12,10 @@ %> <%= include('/elements/xmlhttp.html', - 'url' => $action, - 'subs' => [ 'start_job' ], + 'method' => 'POST', + 'url' => $action, + 'subs' => [ 'start_job' ], + 'key' => $key, ) %> @@ -27,9 +29,13 @@ function OLiframeContent(src, width, height, name) { function <%=$key%>process () { - document.<%=$formname%>.submit.disabled=true; + //alert('<%=$key%>process for form <%=$formname%>'); - overlib( 'Submitting job to server...', WIDTH, 432, HEIGHT, 136, CAPTION, 'Please wait...', STICKY, AUTOSTATUSCAP, CLOSETEXT, '', CLOSECLICK, MIDX, 0, MIDY, 0 ); + if ( document.<%=$formname%>.submit.disabled == false ) { + document.<%=$formname%>.submit.disabled=true; + } + + overlib( 'Submitting job to server...', WIDTH, 444, HEIGHT, 168, CAPTION, 'Please wait...', STICKY, AUTOSTATUSCAP, CLOSETEXT, '', CLOSECLICK, MIDX, 0, MIDY, 0 ); var Hash = new Array(); var x = 0; @@ -40,8 +46,10 @@ function <%=$key%>process () { ) { if ( field.type == 'select-multiple' ) { + //alert('select-multiple ' + field.name); for (var j=0; j < field.options.length; j++) { if ( field.options[j].selected ) { + //alert(field.name + ' => ' + field.options[j].value); Hash[x++] = field.name; Hash[x++] = field.options[j].value; } @@ -61,13 +69,15 @@ function <%=$key%>process () { // jsrsPOST = true; // jsrsExecute( '<%= $action %>', <%=$key%>myCallback, 'start_job', Hash ); - start_job( Hash, <%=$key%>myCallback ); + //alert('start_job( ' + Hash + ', <%=$key%>myCallback )' ); + //alert('start_job()' ); + <%=$key%>start_job( Hash, <%=$key%>myCallback ); } function <%=$key%>myCallback( jobnum ) { - overlib( OLiframeContent('<%=$p%>elements/progress-popup.html?jobnum=' + jobnum + ';<%=$url_or_message_link%>;formname=<%=$formname%>' , 432, 136, 'progress_popup'), CAPTION, 'Please wait...', STICKY, AUTOSTATUSCAP, CLOSETEXT, '', CLOSECLICK, MIDX, 0, MIDY, 0 ); + overlib( OLiframeContent('<%=$p%>elements/progress-popup.html?jobnum=' + jobnum + ';<%=$url_or_message_link%>;formname=<%=$formname%>' , 444, 168, 'progress_popup'), CAPTION, 'Please wait...', STICKY, AUTOSTATUSCAP, CLOSETEXT, '', CLOSECLICK, MIDX, 0, MIDY, 0 ); }