2

does not work in js file while it works perfectly in jsp file. I need to display alerts in font other than english for which i am making use of the applicationResource.properties file. It is working perfectly in jsp file but does not work with js file. Is there any solution for the same.Please help.! ! ! ! !

sTg
  • 4,313
  • 16
  • 68
  • 115
  • I don't know the answer, but I'm curious to find out if you can pass bean values into JavaScript in an external js file. I've typically only done it within on the jsp. – Greg Pettit Apr 03 '12 at 02:38
  • Hey hii Greg..I got it thanks.. I found one work around solution for the same. I am passing the bean message inside one global variable inside jsp file and then passing that variable inside alert in JS file. it works... – sTg Apr 03 '12 at 18:46
  • If you have found solution. Then post answer here and mark it accept. – Hardik Mishra Apr 04 '12 at 08:18

1 Answers1

2

Declare any global variable in jsp file and pass your bean message key inside that. And then pass this value in alert box inside JS file.

sTg
  • 4,313
  • 16
  • 68
  • 115