Skip to content
Loading
  
  •           
  •       
  •   
  •  } 
  • +1
  • Sachin Singh
    +1
    proceed like below
    1. $('#btnAddToPo').on('click', function () {      
    2.         if (($('#Quantity').val()!="") $$ parseInt($('#Quantity').val())>0  ) {      
    3.             var r = alert('Do you want to add this product')      
    4.       
    5.         }      
    6.         else {      
    7.             alert('Quantity cannot be null or equal to zero')      
    8.       
    9.         }      
    10.     })     
     
    +1
  • +1
    Sachin, I have updated the script according to what you wrote, same behavior.
    Do you know a way to track this step by step so I could see what is causing the behavior
     
    Regards
    +1
  • +1
    The problem was cause by the @html.beginform that cause the whole form to be submitted without I implicitely command it to.
     
    I just remove it and the problem was gone.
     
    Thanks for your help
    +1