Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
Messagebox autohide
Messagebox autohide
After a form has been saved, I display a message with nuMessage("Saved + other information..."]);. Now it would be nice if the message would go away on its own after a second. Is that possible?
Re: Messagebox autohide
Timo,
The reason the message stays there is that sometimes a user might need to copy it when its still on the screen.
Steven
The reason the message stays there is that sometimes a user might need to copy it when its still on the screen.
Steven
Re: Messagebox autohide
I agree, sometimes, especially when it is used to output an error message it should not go away on its own. In my case a short informative message is shown and it can disappear again after 1-2 secs
-
- Posts: 785
- Joined: Sun Oct 14, 2018 11:25 am
Re: Messagebox autohide
Timo, you can use a timeout and hide the messagebox:
Code: Select all
function custMessageTimeout(msg, timeout) {
nuMessage(msg);
setTimeout(function() {
$('#nuMessageDiv').hide();
}, timeout);
}
if (nuFormType() == 'edit') {
if (nuIsSaved()) {
custMessageTimeout(["Entry saved"],1500);
}
}