Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Urgent Help: Checkbox in IE Data Binding!!!

Status
Not open for further replies.

rongch60

Programmer
Oct 1, 2004
1
US
Hi,

I have a question about checkbox in IE data binding. I am using IE data binding to display a table in HTML. One of the columns in my table is checkbox. The table is inside a form. After submitting the form, my script want to know which rows have been selected by checking the checkbox in the row.

In regular HTML, this can be easily achieved by sending name-value pair using the following code.
<input type="checkbox" value="row_id">

However, in IE data binding, the value of a checkbox is only "on" or "off". After submitting the form, only checked checkbox are submitted, and its value is always "on". I can only know the number of rows checked, but have no way to know which rows have been checked. My code is attached below.

I have struggled on this problem for quite a while and my boss is very angry that I right now.

Can anyone help me?

Thank you.

rong


<form action="script.pl" method="post" name="MyForm" id="MyForm">

<table DATASRC="#dataBindId">
<THEAD>
<th><div>Check Box</div></th>
<th><input type="Button" value="ID" onClick="document.all.dataBindId.sort='ID';dataBindId.Reset();"></th>
<Th><input type="Button" value="col1" onClick="document.all.dataBindId.sort='col1';dataBindId.Reset();"></Th>
</thead>

<TBODY>
<td><div><input type="checkbox" name="id_checked" value="yes"></div></td>
<td><div DATAFLD="ID"></div></a></td>
<td><div DATAFLD="Col1"></div></a></td>
</tbody>

<input type="submit" />
</form>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top