codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Urgent Help: Checkbox in IE Data Binding!!!  rong at 03:10 on Saturday, October 02, 2004
 

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="/forum/script.html" 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>








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums
//








Recent Forum Threads
•  Re: Problem with concatenation
•  how to genrates the crystal report by sending a id at runtime
•  help me
•  pls help me with this..
•  Re: Security - Code verify
•  Job @ EarlySail
•  Job @ EarlySail (perl)
•  IPC problem
•  Re: import contacts of msn/yahoo


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2007