• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Check Box question

 
Ranch Hand
Posts: 834
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 834
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JavaScript will only make this a temporary delete. Is that what you are after?
 
Alvin chew
Ranch Hand
Posts: 834
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
nope, eric, after user select the checkbox that for deletion, i want to make it permanent deletion to be happen ..
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Then you are going to have to use server side code since JavaScript can not make it permanent.

Eric
 
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
May be this could be helpful...
 
Alvin chew
Ranch Hand
Posts: 834
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks eric and Vijay Vaddem , it a good sample
 
Ranch Hand
Posts: 1228
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
No matter how many women are assigned to the project, a pregnancy takes nine months. Much longer than this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic