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
Dr.Ajay Kashyap
NA
521
283.7k
event.preventDefault not working when condition true
Feb 9 2017 4:01 AM
when condition false event.preventDefault working but when condition true event.preventDefault not submit page.
This Is My Code:-
<script>
$("#category").on('submit', function (event) {
event.preventDefault ? event.preventDefault() : event.returnValue = false;
var url = '@Url.Action("CheckCategory_Name", "CategoryAndSubCategory")';
$.getJSON(url, { Category1: Category1, Category2: Category2, Category3: Category3, Category4: Category4, Category5: Category5 }, function (data) {
debugger;
if (data.isDuplicate != true) {
$("#category").submit();
return true;
}
else {
swal("The Category Name Is Already Exist");
return false;
}
});
});
</script>
Reply
Answers (
7
)
split id s compare two columns values
What s single sign on and how to implement in my application