Hi Brain,
Though it is possible, I would advise you to use a button and call a 
function to submit the required form.

Secondly You need to be careful of having a single input element of type 
text in out form since, a "Enter" key press in that would submit the form.

Take actions accordingly.
I know i didn't explain the solution to your requirement. These are just 
general guidelines

-----------------------------------------------------------------------------------
Veerendra Jote
Sr Software Engineer
Insurance Group
L&T Infotech Ltd.
-----------------------------------------------------------------------------------
Be careful of your thoughts; they may become words at any moment.





"Brian McSweeney" <[EMAIL PROTECTED]>
01/10/03 02:58 PM
Please respond to "Struts Users Mailing List"

 
        To:     "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
        cc: 
        Subject:        Using multiple validators on one jsp


Hi all,
 
Say I have a jsp that takes two input parameters - one is an email and
the other is a credit card.
However I have two submit buttons, so if you enter the email, it runs
Action 1, and if you enter 
The credit card it runs Action 2.
 
I want to use the validator to validate the parameters as being correct
emails and credit cards. 
However I'm not sure if this can be done. For example, if I put at the
top of my page 
 
<html:javascript form="form1"/> which might contain the email parameter,
then only the 
email will get validated in either case. Alternatively if I put at the
top of my page:
 
<html:javascript form="form2"/> which might contain the credit card
parameter, then only the 
credit card will get validated.
 
What I want is - if the user enters an email, then the email gets
validated, and if he enters a 
credit card, then that gets validated.
 
Is this possible?
Thanks,
Brian
 


Reply via email to