Quantcast
Channel: AjaxControlToolkit Work Item Rss Feed
Viewing all articles
Browse latest Browse all 4356

Closed Issue: Validator not working for ajaxToolkit combobox. [24417]

$
0
0
I want to validate ajaxToolkit combobox via RequiredFieldValidator or Custome Javascript.

RequiredFieldValidator not getting fired.....so i use following javascript for validation.
I dont know is the correct way to do this or any other better option available.

var _ddlPreDepartment=document.getElementById('<%=ddlPreDepartment.ClientID %>');

if (_ddlPreDepartment != null && _ddlPreDepartment != 'undefined' && _ddlPreDepartment.childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0].value.toLowerCase() == "select") {
alert('Please select Department.');
_ddlPreDepartment.childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0].focus();
return false;
}
Comments: Workaround found, see comments.

Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>