jillallynwilson
Programmer
Within my company's Supply Chain Management system I need to allow our customers to select multiple lines from their inventory list to be re-ordered. I can get the code to loop through the checked items, however, it only shows the necessary pop-up window for the last item selected.
I need the loop to pause while the users enters the appropriate quantity and re-order options.
Here is my code so far (NOTE: these pages are built dynamically and there may be 1 item or up to 20 items on a page):
<script language="JavaScript" type="text/JavaScript">
<!--
function submitIt(unid, opt, project, cylno, desc, folio, prodcode, custno)
{
var df = window.document.CylinderDetails;
var newwin;
var count = df.count.value;
count++;
for (var i=1; i < count; i++)
{
if (document.CylinderDetails["checkbox_" + i].checked)
{
var cylno = document.CylinderDetails["checkbox_" + i].value
if (opt = "ReOrder")
{
newwin = window.open("/Sample2.nsf/(ReOrder)?OpenAgent&UNID=" + unid + "&Ord=" + project + "&CylNo=" + cylno + "&Desc=" + desc + "&FOLIO=" + folio + "&ProdCode=" + prodcode + "&CustNo=" + custno, "reord","width=400,height=450, status=yes,resizable=yes");
newwin.focus();
}
}
}
}
</script>
<link rel="stylesheet" type="text/css" href="/style.css">
</head>
<body bgcolor="#FFFFFF" leftmargin="3" topmargin="0" marginwidth="0" marginheight="0">
<form style="margin-top: 0; margin-bottom: 0;" name="CylinderDetails" method="post" action="">
<table width="760" border="0" cellspacing="0" cellpadding="0">
<tr><td>HEADING INFORMATION IS HERE-removed to shorten code</td></tr>
<tr>
<td align="left"><input type="checkbox" name="checkbox_1" value="SD0415100"></td>
ADDITIONAL COLUMNS OF DATA-removed to shorten codetd></tr>
<tr>
<td align="left"><input type="checkbox" name="checkbox_2" value="SD0415200"></td>
ADDITIONAL COLUMNS OF DATA-removed to shorten code</td></tr>
<tr>
<td align="left"><input type="checkbox" name="checkbox_3" value="SD04152100"></td>
ADDITIONAL COLUMNS OF DATA-removed to shorten code</td></tr>
---- code continued - only supplied a sample ------
THANK YOU
) for any help that you can give.
I need the loop to pause while the users enters the appropriate quantity and re-order options.
Here is my code so far (NOTE: these pages are built dynamically and there may be 1 item or up to 20 items on a page):
<script language="JavaScript" type="text/JavaScript">
<!--
function submitIt(unid, opt, project, cylno, desc, folio, prodcode, custno)
{
var df = window.document.CylinderDetails;
var newwin;
var count = df.count.value;
count++;
for (var i=1; i < count; i++)
{
if (document.CylinderDetails["checkbox_" + i].checked)
{
var cylno = document.CylinderDetails["checkbox_" + i].value
if (opt = "ReOrder")
{
newwin = window.open("/Sample2.nsf/(ReOrder)?OpenAgent&UNID=" + unid + "&Ord=" + project + "&CylNo=" + cylno + "&Desc=" + desc + "&FOLIO=" + folio + "&ProdCode=" + prodcode + "&CustNo=" + custno, "reord","width=400,height=450, status=yes,resizable=yes");
newwin.focus();
}
}
}
}
</script>
<link rel="stylesheet" type="text/css" href="/style.css">
</head>
<body bgcolor="#FFFFFF" leftmargin="3" topmargin="0" marginwidth="0" marginheight="0">
<form style="margin-top: 0; margin-bottom: 0;" name="CylinderDetails" method="post" action="">
<table width="760" border="0" cellspacing="0" cellpadding="0">
<tr><td>HEADING INFORMATION IS HERE-removed to shorten code</td></tr>
<tr>
<td align="left"><input type="checkbox" name="checkbox_1" value="SD0415100"></td>
ADDITIONAL COLUMNS OF DATA-removed to shorten codetd></tr>
<tr>
<td align="left"><input type="checkbox" name="checkbox_2" value="SD0415200"></td>
ADDITIONAL COLUMNS OF DATA-removed to shorten code</td></tr>
<tr>
<td align="left"><input type="checkbox" name="checkbox_3" value="SD04152100"></td>
ADDITIONAL COLUMNS OF DATA-removed to shorten code</td></tr>
---- code continued - only supplied a sample ------
THANK YOU