Advertisement
| 10.10.2008 at 02:36AM PDT, ID: 23803564 | Points: 500 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: |
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript" src="http://dev.jquery.com/view/trunk/plugins/validate/jquery.validate.js"></script>
<style type="text/css">
#commentForm label.error {
font-size:11px;
color:red;
}
label.valid {
background: url('/js/jquery/img/valid.gif') no-repeat;
height:21px;
width:21px;
display:block;
padding-left: 21px;
}
input.error, input select.error {
background-color: red;
}
</style>
<script>
$(document).ready(function(){
$("#commentForm").validate({
rules: {
cemail: {
required: true,
email: true
}
},
messages: {
cemail: {
required: "<img src='/img/invalid.gif' style='vertical-align: bottom; margin-left: 5px;'><br>Please enter the Email address",
email: "<img src='/invalid.gif' style='vertical-align: top; margin-top:1px; margin-left: 5px;'><br>Invalid Email address"
}
},
submitHandler: function() { alert("Submitted!") }
});
});
</script>
</head>
<body>
<form id="commentForm" name="commentForm" method="get" action="">
<fieldset>
<p>
<label for="cemail">E-Mail</label>
<em>*</em>
<input id="cemail" name="cemail" size="25" />
</p>
</fieldset>
</form>
</body>
</html>
|
Advertisement