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

How to send multiple values of same id but different values of an HTML  RSS feed

 
Kishor Joshi
Ranch Hand
Posts: 674
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there
I have a question in mind that this is my registration form

I am sending these values from HTML form to server and database.
I have question that in my case if I click next to Add Another Mobile no in HTML.then a block is genereated and each time a new name is genaerated.
My Question is if I click 6 times then 6 name attribute are generated.How can i send and differentate them on my server side.

Because at their I will use something request.getAttribute("Attr_Name");

But they are same.

How to do this?.
I hope you got my point or please ask.

Thanks
Reg_Form.PNG
[Thumbnail for Reg_Form.PNG]
 
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
Because at their I will use something request.getAttribute("Attr_Name");

"attributes" have nothing at all do with form submissions or request parameters. It's not the right method to use when doing anything with a form submission.

What you want to look at are the methods that deal with parameters. Look over the JavaDoc for the servlet request and you will find the range of methods that will do what you want.

(I've moved this to the servlets forum.)
 
Kishor Joshi
Ranch Hand
Posts: 674
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i know about request.getparameter();

as I mention in my problem statement element or dynamically added and removed so there can be 2 element or there can be 10 elements my question how to get them with different orders in some constraints like number1,number2,number3 and so on
 
Paul Clapham
Sheriff
Posts: 22185
38
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's a lot I don't understand about this question. Like, are you getting those six names all in a single request, or in six different requests? And, why do you need to differentiate them, and what are the rules you would like to use to do that?
 
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
I said methods (plural), not method (singular). Please ShowSomeEffort and look at the JavaDoc.
 
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
Kishor Joshi wrote:i know about request.getparameter();


And it's getParameter() -- case counts in Java. And as I mentioned in the previous reply, it's not the only method in the toolbox.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!