Ok... Here's the code... I feel like I'm almost there but I'm missing a piece and I don't know Javascript well enough to know if what I want to do is even feasible.
-------------------------------------------------
<script language="javascript">
function SubmitSelectedToEngine(form)
{
var totalPMMTIDs = parseInt(form.count.value);
var PMMTIDList = "";
for (a=1; a < totalPMMTIDs ; a++) // get PMMTID for each item checked
{
name ="checkbox" + a;
selectedPMMTID = <b>VALUE OF CHECKBOX</b>;
if (selectedPMMTID != "")
{
PMMTIDList = PMMTIDList & "'" & name & "'_"
}
}
// update table to reflect new assignment
if (PMMTIDList != "")
{
//removes extra underscore at end
PMMTIDList = PMMTIDList.substring(0, PMMTIDList.length - 1);
return(false);
}
else
{
alert("You must select at least one request, Darice.");
return (false);
}
</script>
<HTML>
<FORM NAME=frmTable method=POST....>
...
<% If Not rstRequests.EOF Then
n=1
While Not rstRequests.EOF
<!-- Check Box -------------->
<INPUT TYPE=checkbox name="checkbox<%=n%>" value=<%=rstRequests("PMMTID")%>>
... (other data shown)
n=n+1
Wend
Response.Write ("<INPUT NAME='count' TYPE='hidden' VALUE=" & n & ">")
<INPUT TYPE=SUBMIT VALUE="SUBMIT SELECTED" onclick="return(SubmitSelectedToEngine(this.form));" >
</FORM>
-----------------------------------------------
Basically I output all the records with a check box on them. The button should get the value for each checkbox that is selected and create a string of the values. (I'm planning on passing this on to another page that will separate the string up and create .xmls based on it.)
****************
DariceLR
:-{} :-V
****************
-------------------------------------------------
<script language="javascript">
function SubmitSelectedToEngine(form)
{
var totalPMMTIDs = parseInt(form.count.value);
var PMMTIDList = "";
for (a=1; a < totalPMMTIDs ; a++) // get PMMTID for each item checked
{
name ="checkbox" + a;
selectedPMMTID = <b>VALUE OF CHECKBOX</b>;
if (selectedPMMTID != "")
{
PMMTIDList = PMMTIDList & "'" & name & "'_"
}
}
// update table to reflect new assignment
if (PMMTIDList != "")
{
//removes extra underscore at end
PMMTIDList = PMMTIDList.substring(0, PMMTIDList.length - 1);
return(false);
}
else
{
alert("You must select at least one request, Darice.");
return (false);
}
</script>
<HTML>
<FORM NAME=frmTable method=POST....>
...
<% If Not rstRequests.EOF Then
n=1
While Not rstRequests.EOF
<!-- Check Box -------------->
<INPUT TYPE=checkbox name="checkbox<%=n%>" value=<%=rstRequests("PMMTID")%>>
... (other data shown)
n=n+1
Wend
Response.Write ("<INPUT NAME='count' TYPE='hidden' VALUE=" & n & ">")
<INPUT TYPE=SUBMIT VALUE="SUBMIT SELECTED" onclick="return(SubmitSelectedToEngine(this.form));" >
</FORM>
-----------------------------------------------
Basically I output all the records with a check box on them. The button should get the value for each checkbox that is selected and create a string of the values. (I'm planning on passing this on to another page that will separate the string up and create .xmls based on it.)
****************
DariceLR
:-{} :-V
****************