Търсене в помощните статии

Избягвайте измамите при поддръжката. Никога няма да ви помолим да се обадите или изпратите SMS на телефонен номер или да споделите лична информация. Моля, докладвайте подозрителна активност на "Докладване за злоупотреба".

Научете повече

Can FF have a javascript function call a form's submit within a loop (multiple submits)?

  • 1 отговор
  • 2 имат този проблем
  • 2 изгледи
  • Последен отговор от the-edmeister

more options

I have a page that allows a user to select multiple reports (links) to view. I have javascript code that works in IE that loops through all the "selected" checkbox objects and submits each "selected" report. Firefox will open the first report but does not open any others.

 function fnSubmit(report,role)
 {
    document.filing.REPORT.value = report;
    document.filing.fr.value = role;
    document.filing.submit();
 }
 function fnView()
 {
    var chkbox = document.getElementsByName("rpt");
    for (var i=0; i<chkbox.length; i++)
    {
       if (chkbox[i].checked==true) {
          link = document.getElementById(chkbox[i].value);
          link.onclick();
       }
    }
 }
</pre>

links look like: <input type="CheckBox" NAME="rpt" Value="23062"> <a id="23062" href="javascript:void(0)" onclick="javascript:fnSubmit('reportid',' ')">002 - Some Report</a>

Thanks for any help.

I have a page that allows a user to select multiple reports (links) to view. I have javascript code that works in IE that loops through all the "selected" checkbox objects and submits each "selected" report. Firefox will open the first report but does not open any others. function fnSubmit(report,role) { document.filing.REPORT.value = report; document.filing.fr.value = role; document.filing.submit(); } function fnView() { var chkbox = document.getElementsByName("rpt"); for (var i=0; i<chkbox.length; i++) { if (chkbox[i].checked==true) { link = document.getElementById(chkbox[i].value); link.onclick(); } } } : : : links look like: <input type="CheckBox" NAME="rpt" Value="23062"> <a id="23062" href="javascript:void(0)" onclick="javascript:fnSubmit('reportid',' ')">002 - Some Report</a> Thanks for any help.

Всички отговори (1)

more options

Try posting at the Web Development / Standards Evangelism forum at MozillaZine. The helpers over there are more knowledgeable about web page development issues with Firefox.
http://forums.mozillazine.org/viewforum.php?f=25
You'll need to register and login to be able to post in that forum.