• Post Reply Bookmark Topic Watch Topic
  • New Topic

Appending 3 text field values in Java Script

 
nalini peddareddy
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Could any of you please help me out in telling as how do we append three text field values and return one value to the servlet.
Actually i have a field SSN(Social security Number) which has 3 text fields.
I need to append all the values and then get the whole value in my servlet thru req.getParameter(SSN);

Please anyone help me out...Its very urgent


Thanks in advance,
Nalini.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why use JavaScript? You could just process the three inputs as they are in your servlet? That will be a more workable solution in case you come accross a client who has JavaScript disabled.

(By the way EaseUp)
 
Sai Venkat
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

You can do that using the javascript. Appending the strings in the javascript it can be passed as a value for the parameter.

Cheers,
Sai
 
vidhyasagar reddy
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
u can do it using java script
take one hidden field by name ssn

if javascript write coding for collecting the text field values and change hidden field value
 
nalini peddareddy
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank u Paul,Sai and VidhyaSagar..


Nalini
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This has nothing to do with the question directly, but assuming you're talking about the SSN as used in the USA, make sure you consider the security aspects of it. You need to use an encrpyted channel (i.e., HTTPS), and whether it is actually legal to collect the SSN for your purposes. IANAL, but i do know that in a number of circumstances where the SSN is asked these days, it is not legal to require it.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!