title: Java variables inside Javascript
body: <p>I have a variable declared outside my javascript function which gets its value from session.</p>
  
  <pre><code>   String elementID = session.getAttribute("elementID");
     &lt;SCRIPT&gt;
          var a = "123"
          elementID = a;
     &lt;/SCRIPT&gt;
  </code></pre>
  
  <p>Will this work out? i need to assign the value "123" to the string variable elementID. </p>