TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Kanaparthi Sureshma Reddy
NA
85
38.3k
How to write validation for Range in asp.net using jQuery ?
Jul 2 2015 12:43 AM
Hi,
I have textboxes,one for ssc marks(0-600) and another is inter marks(0-1000)
I want to write validation for these two textboxes using jQuery.
What should I write in my Scripting??
The following code is What I wrote in my WebForm...
<script type="text/javascript">
function f1(){
var txtssc = $('[id*="txtssc"]').val();
var txtinter = $('[id*="txtinter"]').val();
if (txtssc == "") {
$('[id*="txtssc"]').notify("Marks should not be empty", { position: "top" });
$('[id*="txtssc"]').next().show();
return false;
}
if (txtinter == "") {
$('[id*="txtinter"]').notify("Inter Marks should not be empty", { position: "top" });
$('[id*="txtinter"]').next().show();
return false;
}
}
if (txtssc <=0&&txtssc>=600) {
$('[id*="txtssc"]').notify("Please enter valid SSC Marks ", { position: "top" });
$('[id*="txtssc"]').next().show();
return false;
}
if (txtinter <=0&&txtinter>=1000) {
$('[id*="txtssc"]').notify("Please enter valid Inter marks, { position: "top" });
$('[id*="txtssc"]').next().show();
return false;
}
<script/>
So,my problem is I should not enter less than 0 and greater than 600 and the warning message should display..
Please help me in this code..
Reply
Answers (
4
)
How to write Jquery validation for Radiobutton in asp.net?
I am using taffyDB in one of my application. Is there any li