Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within HTML Pages with CSS and JavaScript
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Ron McLeod
Tim Cooke
Liutauras Vilda
Jeanne Boyarsky
Sheriffs:
Paul Clapham
Rob Spoor
Junilu Lacar
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Piet Souris
Carey Brown
Bartenders:
Forum:
HTML Pages with CSS and JavaScript
Problem validating form with jQuery validation plugin
William Flores
Ranch Hand
Posts: 32
I like...
posted 10 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi guys!
I'm trying validate form with the JQuery, however It isn't works
Follow the code below
<head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Logar</title> <script type = "text/javascript" src="WEB-INF/lib/jquery-1.7.1.js" ></script> <script type = "text/javascript" src = "WEB-INF/lib/jquery.validate.js"></script> <script type = "text/javascript"> $(document).ready(function() { $('#formLogar').validate({ rules:{ cmpRe:{ required: true, minlenght: 3 }, cmpSenha:{ required: true, } }, messages:{ cmpRe:{ required: "Insira o seu RE!!", minlenght: "RE deve conter no mínimo 3 caracteres!" }, cmpSenha:{ required: "Insira sua Senha!!" } } }); }); </script> </head> <body background="imgs/img_fundo.jpg">
I use the I.E and it talks the error is in the line 06
Someone can me help please!
Bear Bibeault
Sheriff
Posts: 67693
173
I like...
posted 10 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
You'll need to show us the exact error message, and pinpoint the real line that the error is occurring on. (line 6 can't be the source of the error.)
[
Asking smart questions
] [
About Bear
] [
Books by Bear
]
Paul Clapham
Sheriff
Posts: 27527
88
I like...
posted 10 years ago
1
Number of slices to send:
Optional 'thank-you' note:
Send
<script type = "text/javascript" src="WEB-INF/lib/jquery-1.7.1.js" ></script>
Are you sure the browser is actually downloading the script from that location?
Bear Bibeault
Sheriff
Posts: 67693
173
I like...
posted 10 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Good catch, Paul. No resources can be served out of WEB-INF.
[
Asking smart questions
] [
About Bear
] [
Books by Bear
]
William Flores
Ranch Hand
Posts: 32
I like...
posted 10 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I solve!
I make a new folder in my project and I put the lib in this folder
<script type = "text/javascript" src="jquery/jquery-1.7.1.js" ></script> <script type = "text/javascript" src = "jquery/jquery.validate.js"></script>
Now, how I do to show a window? Because is show a message in the page.
It has change this messages for a window??
messages:{ cmpRe:{ required: "Insira o seu RE!!", minlenght: "RE deve conter no mínimo 3 caracteres!" }, cmpSenha:{ required: "Insira sua Senha!!" } }
Bear Bibeault
Sheriff
Posts: 67693
173
I like...
posted 10 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Not really. You can control where within the DOM the messages appear. Making them appear in another window would be poor UI in any case.
[
Asking smart questions
] [
About Bear
] [
Books by Bear
]
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
how to get input from javascript and pass to servlet
struts 1.3,Validator forpassword field
javascript to jsp(i am sorry to post it once again please see the code i have everything ut does not
how to transfer data from javascript to jsp
Directory Structure JSP & JS
More...