Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
4
Answers
validate minmum and maximum salaries
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
Prasad Bhagat
10y
1.1k
1
Reply
Dear all,
i have two asp.net textboxes
txtminsal,txtmaxsal,
user when enter the lessthan min salary i want disply alert
defualt.aspx
-------------------
<script type="text/javascript">
function isNumber(evt) {
evt = (evt) ? evt : window.event;
var charCode = (evt.which) ? evt.which : evt.keyCode;
if (charCode > 31 && (charCode < 48 || charCode > 57)) {
alert("enetr numbers");
return false;
}
return true;
}
function Button1_onclick() {
var a = document.getElementById('TextBox1').value;
var b = document.getElementById('TextBox2').value;
if (b < a) {
alert('Maxsal is should be greater than minsal');
return true;
}
else {
return false;
}
}
</script>
</head>
<body>
<form runat="server">
<asp:TextBox ID="TextBox1" runat="server" onkeypress="return isNumber(event)"></asp:TextBox>
<asp:TextBox ID="TextBox2" runat="server" onkeypress="return isNumber(event)" OnTextChanged="Button1_onclick()"></asp:TextBox>
</form>
</body>
</html>
this code is not working
pls help me asap
Post
Reset
Cancel
Answers (
4
)
Next Recommended Forum
Change color of selected menu
calling second condition in content pages using onBlur event