|
-
Dropdown lists needs to be validated using jQuery blur function
Hi all, hopefully doing good all.
i have following HTML code.
<html>
<head>
<script type="text/javascript" src="jquery-1.7.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function()
{
var output="";
output="<select id='day' name='day'>";
output +="<option value='day'>day</option>";
for(var i = 1; i <= 31 ; i++)
{
output +="<option value='" + i + "'>" +i+ "</option>";
}
output +="</select>";
$("#dayCon").html(output);
output="<select id='month' name='month'>";
output +="<option value='month'>month</option>";
var mon=["Jaunary","Febray","March","April","May","June","July","August","September", "October","November","December"];
for(var i = 0 ; i < mon.length ; i++)
{
output +="<option value='" + mon[i] + "'>" +mon[i]+ "</option>";
}
output +="</select>";
$("#monthCon").html(output);
output="<select id='year' name='year'>";
output +="<option value='year'>year</option>";
for(var i = 1950; i <= 2013 ; i++)
{
output +="<option value='" + i + "'>" +i+ "</option>";
}
output +="</select>";
$("#yearCon").html(output);
});
</script>
</head>
<body>
<span id="dayCon" name="dayCon"></span>
<span id="monthCon" name="monthCon"></span>
<span id="yearCon" name="yearCon"></span>
<label class="errField" id="dboLab"></label>
<input type="submit" />
</body>
</html>
Also "jquery-1.7.2.min.js" is attached
following is the out put into a browser.
list box.jpg
I want to validate these lists using J Query Blur function using innerhtml error message.
Please help.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|
Bookmarks