When I am running this code, in the alert I am getting alert messsage as
hi <%= alternateLocaleDCR %>
Why is expression not getting evaluated in this JS code ? Why am I not getting value of hasLocale variable set as "yes" ?
Please let me know, whats wrong here ?
Java/JSP runs, and produces an HTML page.
Javascript starts running when the HTML page reaches your browser.
I would suggest you do a view source on this page to take a look at what the JSP has generated for the javascript to execute.
Where does the javascript fragment get evaluated in relation to the JSP fragment?
The outcome you are seeing seems to indicate that the JSP interpreter is not run on your javascript fragment. Is that javascript fragment in a JSP file or something else?
sunglasses are a type of coolness prosthetic. Check out the sunglasses on this tiny ad: