title: Java String in Javascript function
body: <p>I want to pass a Java string variable to Javascript function which I am calling in Java code. Somehow the value of string remains as null. Is there any way to do this?</p>
  
  <p>Here is some sample code</p>
  
  <pre><code>cb.set(CheckBox.ONCLICK,"displayCB(" + e.getFormName() + ",document.Profile.UniqueForm"+"_TestOpt)");
  </code></pre>
  
  <p>So in above line of code i am calling displayCB javascript function in generated Javascript code while my function for displayCB is like below:</p>
  
  <pre><code>sc.add("function displayCB(formname,field){"); sc.add("var str = formname + 'TestOption'"); ..
  </code></pre>
  
  <p>when I debug through firebug, I get str value as null</p>