I think if I use this method, it will still alert the user even there are
no changes made by the user.


Regards,
Hua Jie


On Wed, Apr 17, 2013 at 5:47 PM, Grégory COLLIN <gcol...@v3d.fr> wrote:

> Le Wed, 17 Apr 2013 05:49:15 +0200,
> 杨华杰 <yhj...@gmail.com> a écrit :
>
> > I want to alert my user if they close the window without save the
> > changes.
> >
> >
> > Is it possible to detect the changes? And how?
> >
> > Welcome any tips
> >
> > Regards,
> > Hua Jie
>
> Hi Hua,
>
> You can use the javascript event beforeunload to alert your user.
> I used mine, like this :
>
> $(window).bind('beforeunload',function(e){}
>
> Regards,
>
> Greg
> _______________________________________________
> Users mailing list
> us...@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
_______________________________________________
Users mailing list
us...@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to