Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

How to validate the input field values before leaving the JSP page?
I set up a jsp page (say: first.jsp) with a couple of input-/entryfields in 
a form.
After the user entered some values he clicks on the submit button.
Normally (if all values are acceptable) the user should be forwarded to the 
next page (next.jsp).
If (and only then) the values are wrong the user should stay on the current 
page and some
error messages should appear at the top of current jsp.

Thus what I need is a code execution BEFORE leaving the current page and not
 (only) when the
page is created.

How do I implement this with JavaServerPages (under JBoss) ?
Unfortuantely there is no command like

<form action="if (validate(this.formdata)==true) next.jsp else first.jsp">

Arnold


Report this thread to moderator Post Follow-up to this message
Old Post
Arnold Peters
10-14-04 01:56 AM


Re: How to validate the input field values before leaving the JSP page?
apet10@hotmail.com (Arnold Peters) wrote in message news:<ckk5e8$dvp$03$1@news.t-online.com
>...
> I set up a jsp page (say: first.jsp) with a couple of input-/entryfields i
n a form.
> After the user entered some values he clicks on the submit button.
> Normally (if all values are acceptable) the user should be forwarded to th
e next page (next.jsp).
> If (and only then) the values are wrong the user should stay on the curren
t page and some
> error messages should appear at the top of current jsp.
>
> Thus what I need is a code execution BEFORE leaving the current page and n
ot (only) when the
> page is created.
>
> How do I implement this with JavaServerPages (under JBoss) ?
> Unfortuantely there is no command like
>
>  <form action="if (validate(this.formdata)==true) next.jsp else first.jsp"
>
>
> Arnold

perhaps something like this

<form onSubmit="return somevalidation(this)">

Report this thread to moderator Post Follow-up to this message
Old Post
Tomer Ben-David
10-27-04 08:56 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Java Beans archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 05:57 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.