I'm supposed to press enter to submit the form
my code doesnt work on this FIDDLE but it works on this one FIDDLE2.
I'm not really sure why and would like to see if anyone knows why. The code is exactly the same
var i = 0;
var allowed = /^[a-zA-Z0-9]+$/;
var input = $('#t_input1').val();
var ar = $('#t_input1').data('name');
alert("Name can have only letters and numbers.\n\n Names Already Submitted: "+ ar.join(" , "));
alert("Your name was successfully submitted\n\n Names Already Submitted: "+ ar.join(" , ") );
i = i+1;
You have not included
jQuery in the first fiddle, and that is why
$ can not be resolved or defined error is there.
Second fiddle does includes
jQuery and it is working as expected.