• 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

[AJAX] Getting values of checked checkboxes in form

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys,
I've encounted a problem passing checkboxes and radios with a form. Here's the code for an example html checkbox array:
*"onKlick" is actually "on Click"

This is the javascript to pass the form:


The problem i have is, instead of just passing the *checked* values of the checkboxes, the form is passing every value. In my php page, if i do a catch:

I will get 1-2-3-4-5- no matter what values i check, even if i dont check anything. Is there anything wrong with my codes above..? Any help is greatly appreciated, thanks!

Kind regards, Mike
[ November 24, 2006: Message edited by: Mike Feng ]
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
and getRequestBody would be?

Eric
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As Eric pointed out, showing us calls to proprietary functions without showing us the function code isn't allowing us to help you any.
 
Mike Feng
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi again,
Lol, a single line from Eric "enlightened" me. Now I understand what went wrong. Pardon me it's my first time going into ajax
 
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
mike,
Even i have the same problem .. what did u do
 
reply
    Bookmark Topic Watch Topic
  • New Topic