David Newton wrote: Why not pass in the message to the JavaScript?
I am not sure what you are asking:( Are you asking why i am not displaying it directly in the Javascript? I want to display alert messages depending upon user locale. That's why i need my js file to pick up different resource bundles depending upon the locale to display alerts in different languages.