wood burning stoves 2.0*
The moose likes Servlets and the fly likes Feild Level Validation without Refreshing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Feild Level Validation without Refreshing" Watch "Feild Level Validation without Refreshing" New topic
Author

Feild Level Validation without Refreshing

tmsenthil kumar
Greenhorn

Joined: Aug 10, 2004
Posts: 11
I need Feild Level validation in jsp page without refreshing.
can anyone pls help me.
Afroz Ahmed
Ranch Hand

Joined: Jan 18, 2004
Posts: 64
Hello,

What do you mean by field level validations exactly?

Like if you want to do validation of an email without submitting,you can use javascript.

write the validate() function logic in the javascript/vbscript and call the validate() function whenever you want.Like when a button is clicked or onfocus etc.

hope this will gives a solution.


The value of an idea lies in the usage of it.
tmsenthil kumar
Greenhorn

Joined: Aug 10, 2004
Posts: 11
We need every field should get validated on server without refreshing.
Kalai Selvan
Ranch Hand

Joined: Jul 07, 2004
Posts: 79
Hi,
I think you can go for client side scripting (i.e. JavaScript), If there is no specific reason for server side validation.

Kalai Selvan T.
tmsenthil kumar
Greenhorn

Joined: Aug 10, 2004
Posts: 11
Feild Level Validation using KEYPRESS without Refreshing.
For example my database table two feilds.userid,username.
i hv a text feild in jsp and enter the userid this userid talk to database
and get into the username without refreshing a page.
can any one help me.
Kalai Selvan
Ranch Hand

Joined: Jul 07, 2004
Posts: 79
Hi,
One solution for your problem is, you can have two frames in a jsp page, one is visible and another hidden. visible frame will contain the actual display jsp page. On the kepress or whatever event you can pass the data from the visible frame to the hidden frame jsp form and submit the form. This will do the server side processing and return the data, which can be updated to the visible frame using javascript.




The above code fragment may not be cent percent correct(syntactically), but it will give fair amount of idea..

Kalai Selvan T.
Julian Kennedy
Ranch Hand

Joined: Aug 02, 2004
Posts: 823
Kalai Selvan T's solution is a good one, but I don't see what the big deal with refreshing is. If you don't want the page to change just return the same data in the response (after validation) as you did the first time. It seems a lot of trouble to go to for no obvious benefit.

Jules
Rovas Kram
Ranch Hand

Joined: Aug 08, 2003
Posts: 135
I'm with Jules on this one. Tmsenthil, you do realize that in order to get the server to do something, you must submit a request and the browser will always display the response from that request? Where do plan to display the results from the validation?
[ August 11, 2004: Message edited by: Rovas Kram ]
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

You know actually thinking about this.

If you had what tmsenthil wanted, you have a thick client. So if you want to stay in the browser world, then you would use an Applet instead of a web page. The Applet could then create a SocketConnection to do RMI type calls.

Web pages are a request/response stateless paradigm.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
tmsenthil kumar
Greenhorn

Joined: Aug 10, 2004
Posts: 11
Thank u for ur inputs.I got a solution using XMLHTTP to do server side validation without page refreshing.Can any one pls tell me any alternate idea?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Feild Level Validation without Refreshing