--ddl validation
var ddlBusinessCat = document.getElementById('ddlBusinessCat').value;
if (ddlBusinessCat == '') {
alert('Select Business Category');
document.getElementById('ddlBusinessCat').focus();
return false;
}
--telerik ddl validation
var ddlCurrency = document.getElementById('ddlCurrency').value;
if (ddlCurrency == '') {
alert('Select Currency');
//document.getElementById('ddlCurrency').focus();
var comboBox = $find('ddlCurrency');
var input = comboBox.get_inputDomElement();
input.focus();
return false;
}
--listbox Validation
var lstRomType = document.getElementById('lstRomType').value;
if (lstRomType == '') {
alert('Select Room Type');
document.getElementById('lstRomType').focus();
return false;
}
--RaddatePicker Validation--No Focus
var txtEffectiveFrom = document.getElementById('txtEffectiveFrom');
if (txtEffectiveFrom.value == '') {
alert("Enter the Effective From Date")
$find("txtEffectiveFrom ").clear();
RPfFocus();
return false;
}
-----------
<div>
<script language="javascript" type="text/javascript">
function RPfFocus() {
var picker = $find("<%= txtDate.ClientID %>");
picker.showPopup();
}
</div>
-----------
--set date to RaddatePicker
datepicker.set_selectedDate('2005-08-06 00:00:00.000');
--Clear to RaddatePicker
$find('txtDate').clear();
--Enabled to RaddatePicker
$find("txtDate").set_enabled(true);
-----------
--Assigning/Changing Label Name in inline Page
document.form1.txtBank.disabled = false;
document.form1.txtAcNo.disabled = false;
document.form1.txtChequeNo.disabled = false;
document.getElementById('txtBank').style.backgroundColor = "white";
document.getElementById('txtAcNo').style.backgroundColor = "white";
document.getElementById('txtChequeNo').style.backgroundColor = "white";
document.getElementById('lblChequeNo').innerText = "ChequeNo";
document.getElementById('lblAcNo').innerText = "A/C No";
$find('txtDate').clear();
$find("txtDate").set_enabled(true);
RPfFocus();
var ddlBusinessCat = document.getElementById('ddlBusinessCat').value;
if (ddlBusinessCat == '') {
alert('Select Business Category');
document.getElementById('ddlBusinessCat').focus();
return false;
}
--telerik ddl validation
var ddlCurrency = document.getElementById('ddlCurrency').value;
if (ddlCurrency == '') {
alert('Select Currency');
//document.getElementById('ddlCurrency').focus();
var comboBox = $find('ddlCurrency');
var input = comboBox.get_inputDomElement();
input.focus();
return false;
}
--listbox Validation
var lstRomType = document.getElementById('lstRomType').value;
if (lstRomType == '') {
alert('Select Room Type');
document.getElementById('lstRomType').focus();
return false;
}
--RaddatePicker Validation--No Focus
var txtEffectiveFrom = document.getElementById('txtEffectiveFrom');
if (txtEffectiveFrom.value == '') {
alert("Enter the Effective From Date")
$find("txtEffectiveFrom ").clear();
RPfFocus();
return false;
}
-----------
<div>
<script language="javascript" type="text/javascript">
function RPfFocus() {
var picker = $find("<%= txtDate.ClientID %>");
picker.showPopup();
}
</div>
-----------
--set date to RaddatePicker
datepicker.set_selectedDate('2005-08-06 00:00:00.000');
--Clear to RaddatePicker
$find('txtDate').clear();
--Enabled to RaddatePicker
$find("txtDate").set_enabled(true);
-----------
--Assigning/Changing Label Name in inline Page
document.form1.txtBank.disabled = false;
document.form1.txtAcNo.disabled = false;
document.form1.txtChequeNo.disabled = false;
document.getElementById('txtBank').style.backgroundColor = "white";
document.getElementById('txtAcNo').style.backgroundColor = "white";
document.getElementById('txtChequeNo').style.backgroundColor = "white";
document.getElementById('lblChequeNo').innerText = "ChequeNo";
document.getElementById('lblAcNo').innerText = "A/C No";
$find('txtDate').clear();
$find("txtDate").set_enabled(true);
RPfFocus();
Good creation and thanks for sharing
ReplyDelete.Net Online Training Hyderabad