# 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/114666>\
**Category:** Ruby\
**Created:** [September 17, 2007, 1:24pm UTC](https://www.ruby-forum.com/t/how-to-put-alert-messages-on-changing-screen-access/114666 "2007-09-17T13:24:00Z")\
**Posts on this page:** 2\
**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:24pm UTC](https://www.ruby-forum.com/t/how-to-put-alert-messages-on-changing-screen-access/114666/1 "2007-09-17T13:24:00Z")

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

---

<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, 10:09pm UTC](https://www.ruby-forum.com/t/how-to-put-alert-messages-on-changing-screen-access/114666/2 "2007-09-17T22:09:44Z")

</div>

On 9/17/07, Pragati [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> him  
> will be lost.
> 
> How do I put this functionality in place?
> 
> Thanks,  
> Pragati

Please specify your app type (web app - rails, standalone - gui gtk,  
tk, wx,…) - nobody is able to help you with such generic  
description.
