Code Comments
Programming Forum and web based access to our favorite programming groups.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
Post Follow-up to this messageapet10@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)">
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.