<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Airbooking.aspx.cs" Inherits="Airbooking" %>
<%-- --%>
function Validation()
{
if (document.Form1.txtfrom1.value.length > 0)
ValidatorEnable(document.getElementById("<%=Rftxtfrom1.ClientID %>").enabled = true);
ValidatorEnable(document.getElementById("<%=Rftxtfrom2.ClientID %>").enabled = true);
ValidatorEnable(document.getElementById("<%=Rftxtjd1.ClientID %>").enabled = true);
ValidatorEnable(document.getElementById("<%=Rfflno1.ClientID %>").enabled = true);
ValidatorEnable(document.getElementById("<%=Rfdep1.ClientID %>").enabled = true);
else
ValidatorEnable(document.getElementById("<%=Rftxtfrom1.ClientID %>").enabled = false);
ValidatorEnable(document.getElementById("<%=Rftxtfrom2.ClientID %>").enabled = false);
ValidatorEnable(document.getElementById("<%=Rftxtjd1.ClientID %>").enabled = false);
ValidatorEnable(document.getElementById("<%=Rfflno1.ClientID %>").enabled = false);
ValidatorEnable(document.getElementById("<%=Rfdep1.ClientID %>").enabled = false);
}
body {
background-color: #FFF;
}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
texbox(txtfrom1,txtto1,txtjd1,txtflno,txtdep1) requirfield validator always enabled.(txtfrom2,txtto2,txtjd2,txtflno2,txtdep2 are requirfield validator disabled ) then customer entered second flight detail txtbox2 a single letter (txtfrom2,txtto2,txtjd2,txtflno2,txtdep2) requirfield validator automaticaly ennabled in javascript help me
Chandradev PrasadPosted Oct 21, 2014, 5:59 AM
Please check this URL
http://chandradev819.wordpress.com/2013/03/21/how-to-do-basis-validation-using-javascript-in-asp-net/