Dynamically Assigned Checkbox Value

I am a relative beginner and need some help doing something pretty simple (or so I thought).

I have an XML file.  I want the page to create a dynamic table with checkboxes based on the XML file.  I was able to do that pretty easy using Spry.  However, I need to know how to dynamically assign the value of the checkbox to one of the fields in the row.

I will come up with a more permanent solution, but by the end of the day today, I need to come up with a makeshift solution for this. I simply need to pass the value of the checkbox to a perl script to display the list of selected checkboxes and then submit it via email.

Basically, everything works as I need it to, I just need to change the value of the checkboxes from "on" to an actual value.  Based on the XML file below, need the value to be assigned to either the "lot id#" or the "lot_no" which are the same value.  I currently am able to return an "on" for every checked checkbox (five checked, I get five "on" 's returned").

Thanks guys and girls!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:spry="http://ns.adobe.com/spry">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Title</title>
<link href="styles.css" rel="stylesheet" type="text/css" />
<script src="SpryAssets/xpath.js" type="text/javascript"></script>
<script src="SpryAssets/SpryData.js" type="text/javascript"></script>
<script type="text/javascript">
<!--
var ds1 = new Spry.Data.XMLDataSet("http://www.xxx.com/xxx.nsf/CTinv.xml", "inventory/lot");
//-->
</script>
</head>
 
<body bgcolor="#CCCCCC">
<h1>XXX</h1>
<h2>Lot Consumption Report</h2>
<hr width="600 px" color="#333333" align="left" />
<h3>Select the lots that have been consumed:<br /><br />
Nagatuk Material<br /></h3>
 
<FORM METHOD='POST' ACTION='/cgi-bin/cr3.pl'>
<div spry:region="ds1">
  <table width="506">
    <tr>
      <th width="29"></th>
      <th width="56">Lot_no</th>
      <th width="67">Shape</th>
      <th width="57">Size</th>
      <th width="67">Grade</th>
      <th width="48">Qty</th>
      <th width="57">Base</th>
      <th width="89">Shipped</th>
    </tr>
    <tr spry:repeat="ds1">
      <td><input type="checkbox" name="cb" /></td>
      <td>{lot_no}</td>
      <td>{shape}</td>
      <td>{size}</td>
      <td>{grade}</td>
      <td>{qty}</td>
      <td>{base}</td>
      <td>{shipped}</td>
    </tr>
  </table>
</div>
<input name="Submit" type="Submit" value="Submit" /><input type="reset" name="reset" value="Reset Form" />
</FORM>
</p>
</body>
</html>
 
 
 
XML FIle:
 
 
 
  <?xml version="1.0" ?> 
- <inventory>
- <lot id="019-479461">
  <lot_no>019-479461</lot_no> 
  <shape>RD</shape> 
  <size>1-11/16</size> 
  <grade>12L14</grade> 
  <qty>3,921</qty> 
  <base>0.4650</base> 
  <shipped>10/22/2008</shipped> 
  </lot>
- <lot id="019-479464">
  <lot_no>019-479464</lot_no> 
  <shape>RD</shape> 
  <size>1-11/16</size> 
  <grade>12L14</grade> 
  <qty>3,910</qty> 
  <base>0.4650</base> 
  <shipped>10/22/2008</shipped> 
  </lot>
- <lot id="019-479480">
  <lot_no>019-479480</lot_no> 
  <shape>RD</shape> 
  <size>1-11/16</size> 
  <grade>12L14</grade> 
  <qty>3,918</qty> 
  <base>0.4650</base> 
  <shipped>10/22/2008</shipped> 
  </lot>
- <lot id="019-479482">
  <lot_no>019-479482</lot_no> 
  <shape>RD</shape> 
  <size>1-11/16</size> 
  <grade>12L14</grade> 
  <qty>3,918</qty> 
  <base>0.4650</base> 
  <shipped>10/22/2008</shipped> 
  </lot>
- <lot id="019-479486">
  <lot_no>019-479486</lot_no> 
  <shape>RD</shape> 
  <size>1-11/16</size> 
  <grade>12L14</grade> 
  <qty>3,833</qty> 
  <base>0.4650</base> 
  <shipped>10/22/2008</shipped> 
  </lot>
- <lot id="019-479518">
  <lot_no>019-479518</lot_no> 
  <shape>RD</shape> 
  <size>1-11/16</size> 
  <grade>12L14</grade> 
  <qty>3,936</qty> 
  <base>0.4650</base> 
  <shipped>10/22/2008</shipped> 
  </lot>
  </inventory>

Open in new window

kevklineAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Michel PlungjanIT ExpertCommented:
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
kevklineAuthor Commented:
Just wanted to update this.  Simple fix.  Simply added this code as the value for the checkbox within the spry:repeat:

value="{ds1::lot_no}"

0
Michel PlungjanIT ExpertCommented:
Ah, I thought you wanted to choose which one
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.