javascript - Coldfusion, 5 forms submit to iframe -
i have 5 forms in coldfusion submit 1 iframe, , iframe calls coldfusion page. forms , iframe working fine. problem need wait 1 form finish submitting call submit of form.
$("#form1").attr('action', 'uploadpicturesvideos.cfm'); $("#form1").attr('target', 'uploadiframe'); $("#form1").submit(); $("#form2").attr('action', 'uploadpicturesvideos.cfm'); $("#form2").attr('target', 'uploadiframe'); $("#form2").submit(); $("#form3").attr('action', 'uploadpicturesvideos.cfm'); $("#form3").attr('target', 'uploadiframe'); $("#form3").submit(); $("#form4").attr('action', 'uploadpicturesvideos.cfm'); $("#form4").attr('target', 'uploadiframe'); $("#form4").submit(); $("#form5").attr('action', 'uploadpicturesvideos.cfm'); $("#form5").attr('target', 'uploadiframe'); $("#form5").submit();
my question how can wait form1 finish submitting start submitting form2... form3... form4... form5
thanks
in source of action page put script submits next form. you'll have to:
- use
top
orparent
in action's script - keep track of iteration putting hidden field in each form
- add 'name' attribute each form iteration, such 'myform4'
so when hidden field iteration=4
passed 4th form, output in script:
top.document.myform4.submit();
Comments
Post a Comment