aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes [AJAX] Getting values of checked checkboxes in form Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "[AJAX] Getting values of checked checkboxes in form" Watch "[AJAX] Getting values of checked checkboxes in form" New topic
Author

[AJAX] Getting values of checked checkboxes in form

Mike Feng
Greenhorn

Joined: Nov 24, 2006
Posts: 2
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

Joined: Nov 08, 2001
Posts: 15376
    
    6
and getRequestBody would be?

Eric
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61218
    
  66

As Eric pointed out, showing us calls to proprietary functions without showing us the function code isn't allowing us to help you any.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Mike Feng
Greenhorn

Joined: Nov 24, 2006
Posts: 2
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

Joined: Nov 07, 2006
Posts: 109
mike,
Even i have the same problem .. what did u do
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: [AJAX] Getting values of checked checkboxes in form