How to set a text field field in an invitation field as a required field?
var answer=prompt('Reason for deletion?');
Since it window.promptis modal, you can use the following logic:
window.prompt
while(!answer){ var answer=prompt('Reason for deletion?'); };
var answer=prompt('Reason for deletion?'); if(answer !=null) { /* Your code */ } else if(!answer) { alert('Entry Required'); return false; } else { alert('Entry Cancelled By User'); return false; }
Use this and also check this
Source: https://habr.com/ru/post/1589367/More articles:Wait for the request to complete Node.js - javascriptHow to scroll text using the search bar? - androidinability to get data in karma function from controller transfer statement - angularjsrun shell script at boot time in linux redhat - redirectError using GTK - python-2.7Re-request permissions to use Facebook using oAuth not working - facebookWorking on the same branch, how to pull without losing changes? - gitСоздать файл Excel в Nodejs - node.jseach according to the result of an auxiliary function? - javascriptApplication error when resuming - javaAll Articles