File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Field validation with directive Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Field validation with directive" Watch "Field validation with directive" New topic
Author

Field validation with directive

Roberto Alves Pereira
Greenhorn

Joined: Nov 18, 2012
Posts: 13
cabecalho.html




Exercicio.jsp




Exercicio19.js





Exercicio19.jsp





rodape.html


project (eclipse) https://www.dropbox.com/s/9nctwcu0y2aoacr/Exercicio19.rar

Server validation always invalid by the Directive because?

Note: This is an exercise in college
Mansukhdeep Thind
Ranch Hand

Joined: Jul 27, 2010
Posts: 1157

Welcome to the ranch Roberto. :) I could not understand what your doubt is. Can you explain in some more detail as to exactly what is the problem that you are facing?


~ Mansukh
Roberto Alves Pereira
Greenhorn

Joined: Nov 18, 2012
Posts: 13
1 - Run the application
2 - Enter number 1 (beginning)
3 - Digita number 2 (end)

Server validation if number1 <0 | | number2> 20 return false

The program never returns true
The program comes in is always returns false


Sorry for english mistakes, I am beginner
Mansukhdeep Thind
Ranch Hand

Joined: Jul 27, 2010
Posts: 1157

Don't apologize. I can tell by your name that you are of Hispanic descent. :)
Mansukhdeep Thind
Ranch Hand

Joined: Jul 27, 2010
Posts: 1157

Your method is :



I debugged and saw that it is written to return false if the numbers are either <0 or > 21. How can you expect it to work otherwise? :)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Field validation with directive