• 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
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

ask 'bout checkbox again(array)

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear peeps,

I am designing an application.
In jsp,
I have checkboxes with same name.
Let's say I have 5 checkboxes in a jsp.

And I have checked second and fifth one.

The question is :
Do I have an array of size 2 or size 5 for these checkboxes on the form of server?

I thought I would have a String array of size 5 with the value of {null, "1", null, null, "1"}
Please make me sure.
I want to know what http does for me.
 
Sheriff
Posts: 67756
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
Firstly, having multiple checkboxes with the same name and value makes no sense. The values should vary so that you can tell which was checked.

But as to your question, that's something that should be extremely simple to test for yourself. Why not give it a try and report back with your findings?
[ October 23, 2008: Message edited by: Bear Bibeault ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic