• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

checkboxes

 
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
All,

I have a form of multiple checkboxes with the same name.
How do I get the value of unchecked checkboxes ?

I want to update one field in database if the row/rows is unselected.

Thanks
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Shouldn't your server already know the values? The browser will only send what is selected.

Eric
 
Ranch Hand
Posts: 884
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Eric Pascarello:
Shouldn't your server already know the values? The browser will only send what is selected.

Eric



Using some simple JavaScript, he could send a hidden field value back to denote unselected checkboxes. So the browser could send either checked/unchecked values.

Atul, you could iterate through to check which checkbox is unselected, then assign a value to a hidden field & send it back. Try Googling, you'll find lots of sample JavaScript codes for it.
 
reply
    Bookmark Topic Watch Topic
  • New Topic