# How to put alert messages on changing screen access

**URL:** <https://www.ruby-forum.com/t/how-to-put-alert-messages-on-changing-screen-access/196465>\
**Category:** Rails\
**Created:** [September 17, 2007, 1:25pm UTC](https://www.ruby-forum.com/t/how-to-put-alert-messages-on-changing-screen-access/196465 "2007-09-17T13:25:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pragati](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/43a26b/32.png) [@pragati](https://www.ruby-forum.com/u/pragati)\
**Post date:** [September 17, 2007, 1:25pm UTC](https://www.ruby-forum.com/t/how-to-put-alert-messages-on-changing-screen-access/196465/1 "2007-09-17T13:25:14Z")

</div>

Hi,

I have a small application. I have two features for instance, NEW and  
SEARCH. When a user presses NEW, he’s supposed to enter around 14  
entries  
in the form. Now, let’s take he entered 8 entries and switches to  
SEARCH  
button. I want an alert message to be shown to the user that, if he  
leaves  
the page and doesn’t SAVE the information, the information entered by  
him  
will be lost.

How do I put this functionality in place?

Thanks,  
Pragati
