I have a variable declared outside my javascript function which gets its value from session.
String elementID = session.getAttribute("elementID");
<SCRIPT>
var a = "123"
elementID = a;
</SCRIPT>
Will this work out? i need to assign the value "123" to the string variable elementID.