# Alert messages on changing screen access

**URL:** <https://www.ruby-forum.com/t/alert-messages-on-changing-screen-access/114489>\
**Category:** Rails\
**Created:** [September 13, 2007, 9:44am UTC](https://www.ruby-forum.com/t/alert-messages-on-changing-screen-access/114489 "2007-09-13T09:44:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [September 13, 2007, 9:44am UTC](https://www.ruby-forum.com/t/alert-messages-on-changing-screen-access/114489/1 "2007-09-13T09:44:19Z")

</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
