GeeCON Prague 2014*
The moose likes HTML, CSS and JavaScript and the fly likes How to show Navigating away alert based on locale option Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "How to show Navigating away alert based on locale option" Watch "How to show Navigating away alert based on locale option" New topic
Author

How to show Navigating away alert based on locale option

hitendra sunkara
Ranch Hand

Joined: Jul 25, 2013
Posts: 35

i am using a navigating alert when user leaves the page without saving data using the following code.

$(document).ready(function(){

window.onbeforeunload = function(e){

if(dataChnaged()){

return '' ;
}
}
});

i am getting like this in fire fox.. i need to show this alert based on locale(different languages). is there any way to do this?




[Thumbnail for navigatingAlert.png]

Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

Based on what locale? I mean, where are you getting the locale from?
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
What is displayed in that confirmation is based of the user's language settings. You have no control over that.
 
GeeCON Prague 2014
 
subject: How to show Navigating away alert based on locale option