Prasad Bhagat

Prasad Bhagat

  • NA
  • 516
  • 235.4k

calling second condition in content pages using onBlur event

Aug 8 2014 10:26 AM
Dear all ,
 
the onBlur event in content pages not working properly 
please look at my code but 
 
i have one question how to call second condition on that 
its always printing only one value
 
 
 
function validate() {
debugger;
var txt1 = document.getElementById('<%= txtminsal.ClientID %>');
var txt2 = document.getElementById('<%= txtmaxsal.ClientID %>');
txt2 >txt1
alert("Max is should be greater than min");

return false;

}
 
  <asp:TextBox ID="txtmaxsal" runat="server" onkeypress="return Validate(event);" onblur="javascript:validate();" ClientIDMode="Static" Font-Size="16px" TabIndex="13" CssClass="text" placeholder="Max Salary"></asp:TextBox>
 
 
 please tell me the reson if my condition true then show the alert
if my condition is false i dont want to show the alert
 
 

Answers (4)