Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

ask 'bout checkbox again(array)  RSS feed

 
changhyun moon
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • 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.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65826
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • 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 ]
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!