AnsweredAssumed Answered

how to produce an alert pop up message when user enters invalid input before submitting the form?

Question asked by aishuiyer on Jul 13, 2018
Latest reply on Jul 16, 2018 by aishuiyer

I have written the following code

can anyone tell me where am I going wrong?

 

 

NWF$(document).ready(function()

 {  
   var  fromShortcode = NWF$("#" + choiceCode);
   var  toShortcode = NWF$("#" + shortCode);
   var dp1 = fromShortcode.val();

    NWF$('#' + shortCode).change(function()
 {
  alert(dp1);
  alert(toShortcode);
  if (fromShortcode == toShortcode){
 alert("same values in both the field!");
   }
  

});
 
   });

Outcomes