Show the prompt window:
Code: Select all
nuPrompt('How are you?','Random Question');
Code: Select all
function nuOnPromptClose(val, ok) {
if (ok) {
nuMessage(['You entered:',val]);
}
}
Code: Select all
nuPrompt('How are you?','Random Question');
Code: Select all
function nuOnPromptClose(val, ok) {
if (ok) {
nuMessage(['You entered:',val]);
}
}
Code: Select all
// Some context data that you want to pass to the callback
let customerID = '12345';
let currentDate = '2025-06-14';
nuPrompt('Enter comment:', 'Add Note', '', '', function (val, ok) {
if (ok) {
saveNote(customerID, currentDate, val);
}
});
function saveNote(customerID, date, noteText) {
nuMessage(['Saving note for customer:', customerID, 'Date:', date, 'Note:', noteText]);
}