| Author |
Check Box question
|
Alvin chew
Ranch Hand
Joined: Jan 08, 2004
Posts: 834
|
|
|
hi, good day, if i have many checkbox , how do i keep track how many checkbox user have been select , so that we can delete the related items, it work similar like deleting email ? thank you
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15362
|
|
When you submit the form it should contain all of the checkboxes that have been selected. Not sure what you are looking for exactly. Eric
|
 |
Alvin chew
Ranch Hand
Joined: Jan 08, 2004
Posts: 834
|
|
|
hi, eric , say i have many row in table, i want to make check box beside on each row , when user select it , and after user click delete , then the row been selected can be delete or erase ..
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15362
|
|
|
JavaScript will only make this a temporary delete. Is that what you are after?
|
 |
Alvin chew
Ranch Hand
Joined: Jan 08, 2004
Posts: 834
|
|
|
nope, eric, after user select the checkbox that for deletion, i want to make it permanent deletion to be happen ..
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15362
|
|
Then you are going to have to use server side code since JavaScript can not make it permanent. Eric
|
 |
Vijay Vaddem
Ranch Hand
Joined: Feb 13, 2004
Posts: 243
|
|
|
May be this could be helpful...
|
 |
Alvin chew
Ranch Hand
Joined: Jan 08, 2004
Posts: 834
|
|
thanks eric and Vijay Vaddem , it a good sample
|
 |
Srinivasa Raghavan
Ranch Hand
Joined: Sep 28, 2004
Posts: 1228
|
|
In one of my previous project there was a requirement like this .. A jsp displays a database table for each row a check box is provided .. so that onSubmit all the rows corresponding to the selected checkboxes should get deleted from the DB ( some thing like a email). This was our solution The check boxes were created in runtime by the jsp ( each row has a check box). The name of each check box is the value of the primary key from the table. When any chek box is selected a hidden textfield is updated with this NAME OF THE selected check box At last the hidden text will have comma seperated values that corresponds to the selected values in check box like this ( 1,2,3,4, ) On Submit this comma seperated value is passed to a stored procedure that deletes all the selected records.
|
Thanks & regards, Srini
MCP, SCJP-1.4, NCFM (Financial Markets), Oracle 9i - SQL ( 1Z0-007 ), ITIL Certified
|
 |
 |
|
|
subject: Check Box question
|
|
|