• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

[AJAX] Getting values of checked checkboxes in form

 
Mike Feng
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • 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 ]
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
and getRequestBody would be?

Eric
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65216
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
jeff rusty
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
mike,
Even i have the same problem .. what did u do
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic