This topic is locked
[SOLVED]

Timer Message

3/19/2025 4:42:40 PM
PHPRunner General questions
milver author

I changed the message from: "record updated" in the event:

after record updated

$pageObject->setMessageType(MESSAGE_INFO);
$pageObject->setMessage("Settings updated successfully!");

Is it possible to insert a timer? That is, make this message disappear after 5 seconds for example?

Sergey Kornilov admin 3/19/2025

This should be fairly straightforward with the help of jQuery. Here is the StackOverflow article that provides some ideas:
https://stackoverflow.com/questions/683363/jquery-autohide-element-after-5-seconds

And I think that code you need to add Javascript OnLoad event of that Edit page is as follows:

$('div[data-itemtype="edit_message"]').delay(5000).fadeOut('slow');

milver author 3/19/2025

Perfect, thank you very much!