Hello,
I am suing window.prompt() to enter one text value from the user, storing it in javascript variable & sending it using ajax to php script in order to save it in database. I want to validate this input whether user have entered value or not. But I am unable to do so. Here is my javascript code.
var userInput = window.prompt('please enter value');
if(userInput!="" || userInput!=null)
{
AJAX CODE FOR INSERTING VALUE IN DATABASE......
}
But this code doesn't works.. Please help me. Thanks in advance.