Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to show Navigating away alert based on locale option

 
hitendra sunkara
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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?


navigatingAlert.png
[Thumbnail for navigatingAlert.png]
 
Paul Clapham
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Based on what locale? I mean, where are you getting the locale from?
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is displayed in that confirmation is based of the user's language settings. You have no control over that.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic