Hi,
I have a form and onsubmit calling a javascript function to make sure some value does exists in database. If the value exists I
am submitting a form but if the value does not exists I don't want to submit a form rather show user a message. I am trying to use
AJAX, it does go to the databse and checks for the required value but whatever the value is it still keeps submiting the form. Can someone please
help me what am I doing wrong here. Here is my code:
In my JSP I have the following piece:
Here is javascript:
In onResponse function above no matter if it returns true or false the FORM keeps on submitting. Any help is appreciated.
Thanks