Hi there,
I have a view with an input field and a button when the button is clicked it triggers a jquery function to check where the value in the field is null or not if null I show a jquery alert saying the value cannot be nul
here is the script
$(document).ready(function(){
$('#btnAdd).on('click', function(){
if($('#Quantity).val()>0)
{
....
}
else
{
alert('Quantity cannot be null')
}
})
my problem is after the alert is displayed it goes straight to the index page instead of staying on the create one. I dunno why, could someone help me out please
Regard
Schleid
Schleid AlexPosted Dec 2, 2020, 8:49 AM
Schleid AlexPosted Dec 2, 2020, 8:12 AM
Sachin SinghPosted Dec 2, 2020, 7:43 AM
Schleid AlexPosted Dec 2, 2020, 7:17 AM
Sachin SinghPosted Dec 2, 2020, 6:09 AM
Schleid AlexPosted Dec 2, 2020, 6:03 AM
Sachin SinghPosted Dec 1, 2020, 10:28 PM