Displaying a specific snackbar on page load from a specific location

I have a JavaScript code that can display a snackbar on pageload. What i want is a way of displaying a specific snackbar when page loads from a specific location or an alternative way of achieving it.

Example: deleting a record by submitting a form with record id to another page with a code to delete record and redirect back : on page load display a snackbar with a message record deleted.


You could have the script that deletes the record set a session cookie upon successful delete. Your client-side script could check for the presence of that cookie and display the message accordingly.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.