• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

remitting values

 
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Ranchers,

I have designed a dynamic registration page in which i am verifying Login name already exists or not(i am verifying from servlet where all the details entered by the user get stored)and if the Login name is already there in database, servlet takes user back to original registration page alongwith all the details which user has entered on registration page so that user can only change his username and no need to fill up all the details again.

What i am doing is using Request.getParameter on the same registration page to reterive values again after checking in the database for username.

eg:

String Login=request.getParameter("member_login");
<input type="password" name="member_password" maxlength="20" value="<%=Login%>
Now it is working fine,

But my problem is I have provided one field as "Salutaion" in the registration form which has two options "Mr" and "Ms" ,
now as "Salutaion" fieled has two options "Mr" and "Ms" i am unable to retrive parameters back on my registration page. eg:

String Salutation=request.getParameter("Salutation");

<td style="background-color: #FFEAC5; border-style: inset; border-width: 0"><font style="font-size: 10pt; color: #000000">Salutation*</font></td><td style="background-color: #FFFFFF; border-width: 1"><select name="Salutation"><option value="--Select--"></option><option value="2" >Mr.</option><option value="1" >Ms.</option></select></td>

Please suggest what should i pass in the above value filed (i.e. value="2" and value="1") so that i will be able to retrive parameters on the registration page for field salutation.

please suggest at your earliest.

Also my another query is, once if the Login name already exist in database servlet will take me back to registration page. Now i would like my cursor in value field for Login name so that user can directly enter new login name.(i mean same as focus and select in javascript, but now i want this on jsp page)

please revert at your earliest. Thanks in advance.

Yogi.
 
Ranch Hand
Posts: 1325
Android Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
after comeback on registration page you need apply the if conditions like

Example code:



use same code for <select> is value is not equal to null then set this value inside the selected attribute.

hope it helps..
 
Sheriff
Posts: 67746
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
If you were using modern standards -- using the EL as opposed to scriptlets -- this would not be an issue.



would be all the code that you needed.
[ March 23, 2007: Message edited by: Bear Bibeault ]
 
Yogendra Joshi
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Ranchers...will try and update you on the same.

Yogi.
 
Get meta with me! What pursues us is our own obsessions! But not this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic