The Code-Bin
Links
Home
Add your code!
All Listings
About
Latest Entry
Featured Scripts
Author's Website
Latest Entries
FFMPEG Thumbnail Scr...
PHP, 0.8KB
Jul. 29, 10:24pm
John
Z80 Assembler, 190 bytes
Feb. 17, 3:36am
John
Z80 Assembler, 176 bytes
Sep. 13, 2:19am
John
Z80 Assembler, 77 bytes
Sep. 13, 2:18am
John
Z80 Assembler, 209 bytes
Sep. 13, 2:17am
jquery validate / overlay display
Posted by: Trevor | July 10, 2010 @ 6:40pm
Javascript Code
[
Download
]
<script> //calling colorbox $(document).ready(function() { $("#feedback-form").validate({ rules: { clientFirstName: "required", clientLastName: "required", clientEmail: { required: true, minlength: 2, remote: "users.php" }, password_confirm: { required: true, minlength: 5, equalTo: "#password" }, clientEmail: { required: true, email: true, }, clientPhone: { required: true, minlength: 10, digits: true, }, clientCountry: "required", clientState: "required", clientInterest: "required" }, messages: { clientFirstName: "Please provide your First Name.<br>", clientLastName: "Please provide your Last Name.<br>", clientEmail: "Please provide a valid Email Address.<br>", clientPhone: "Please provide a valid Phone Number.<br>", clientCountry: "Please provide your Country.<br>", clientState: "Please provide your State.<br>", clientInterest: "Please provide your interest in VirTra.<br>", }, // the errorPlacement has to take the table layout into account errorPlacement: function(error, element) { error.appendTo('#errors'); $(".example8").colorbox({width:"50%", inline:true, href:"#errors"}); } }); }); </script>
Syntax Highlighting
[
Open in new window
]
Author Comments
Clicking submit twice generates the correct behavior but it should only require clicking submit once.
http://www.trevorcaesar.com/virtra/ie6/index_bu3.html
Rating
4.32 / 8
37 Votes
http://codebin.yi.org/733
page generated in 0.01 seconds