Tech
Forums
Jobs
Books
Events
Live
Interviews
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
2
Reply
how to validate asp:dropdown list using javascript.
nitesh garewal
Feb 26 2016 6:43 AM
342
Reply
Hey friends,
how to change dropdown border color when its initIal value is 00 using jquery
I m using this code but its not working ,,please help
<script type="text/javascript">
function validate() {
var v = document.getElementById("<%=ddlMDist.SelectedValue%>");
if (v == "00") {
v.style.backgroundColor = "red";
}
</script>
<asp:UpdatePanel ID="UpdatePanel4" runat="server" UpdateMode="Always">
<ContentTemplate>
<asp:DropDownList ID="ddlMDist" runat="server" data-toggle="dropdown" aria-haspopup="true" AutoPostBack="True" TabIndex="6" OnSelectedIndexChanged="ddlMDist_SelectedIndexChanged" onchange="validate();">
<asp:ListItem Value="00">Dist Name</asp:ListItem>
</asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
Problem with slideshow in javascript
Problem With Set Interval