I am trying to submit a form then update some values and submit it again. However, when I do this only the LAST version is being submitted. I get one error for Unsafe Javascript attempt to access frame with URL domain2.com from frame with URL domain1 . Domains, Protocols and Ports must match.
form code:
<form id="hiddenform" method="post" enctype="multipart/form-data" action="http://www.actonsoftware.com/acton/forms/userSubmit.jsp" accept-charset="UTF-8" target="tintest">
the target is a hidden iframe with the id="tintest"
This is my code:
var tbody = $("#vmMainPage table:first tbody");
var lng = tbody[0].rows.length - 1;
var mnstr = "items: ";
$("#vmMainPage table:first tbody tr").each(function(i){
if ((i>0) && (i<(lng-3))) {
item = $(this).children("td").children("a").children("strong").html();
// quantity = "
console.log(item);
$("#hiddenform input#fld_0").val(item);
var $tsta = "";
for ( j=2; j<6; j++)
{
$tst = $("table:eq(2) tr:eq("+j+") td:eq(1)").html();
$tsta = $tsta + $tst +", ";
}
$email = $("table:eq(2) tr:eq(6) td:eq(1)").html();
$("#hiddenform input#fld_2").val($email+"_"+i);
$("#hiddenform input#fld_1").val($tsta);
$("#hiddenform").submit();
}
});
To make sure your requests are not interfering with each other, you can create an iframe for each request and target that.
this can be done with DOM
var cnt=0;
or jQuery