Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Remote Scripting

 
Hari Haran
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a jsp page .On clicking a function key i dynamically generate a text box and enter a value in it.This i do it using javascript.Now i want to validate this entered value.The validation requires database access.And based on the validation result i have to perform some action.The validation logic is in a servlet. How can i make use of remote scripting for this purpose.? How can i access that validation logic by remote scripting ? Can anybody help me ?
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Basically you are going to have to repost the form and do your validation that way by doing the lookup in the database.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Hari",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp.
We require names to have at least two words: your first name, a space, then your last name. Fictitious names are not allowed. Please edit your profile and select a new name which meets the requirements.
Thanks.
Dave
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eric is right though, pick either server side or client side. You can't have it both ways.
Actually, you can, but then you end up with your application spread half way across the internet. If the database is required for validation, submit back to the server, validate on the server, send the response.
Dave.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic