title: String data passed to Java Applet by javascript is null when in Java applet
body: <p>This question may look familliar but I've discovered some rather more pertinent information and tried some other things (which are detailed below) so to avoid confusion I've created another question.</p>
  
  <p>Here's the JavaScript (on an aspx page):</p>
  
  <pre><code>function CallApplet(clientRef, system, branch, category, pdfXML)
  {        
      AppletReturnValue = document.DocApplet.WriteDocument(clientRef, apmBROOMS, branch, category, pdfXML);
      //do something with the return value here
  }
  </code></pre>
  
  <p>pdfXML is got from pdfData which is a hidden field on the page containing the XML that contains <strong>base64 encoded pdf data</strong> which is passed to the java applet.  All the other values being passed to the applet's WriteDocument method have within range sensible values.</p>
  
  <p>The XML is like this</p>
  
  <pre><code>&lt;Documents&gt;
     &lt;FileName&gt;AFileName&lt;/FileName&gt;   
     &lt;PDF&gt;JVBERiDAzOTY1NzMwIDAwMDAwIG4NCjAwMDM5NjU4NDcgMDAwMDAgbg0KMDAwMzk2NTk2&lt;/PDF&gt;
  &lt;/Documents&gt;
  </code></pre>
  
  <p>(the content of the PDF element is a lot bigger than displayed above, i've truncated the data for space reasons; the PDF data is about 4Mb)</p>
  
  <p>The signature of the Java method is:</p>
  
  <pre><code>public String WriteDocument(String clientPolicyReference,
                                         int systemType,
                                         int branch,
                                         String category,
                                         String PDFData) throws Exception
  </code></pre>
  
  <p>What happens is that somehow the xml string data is lost and by the time one gets into the Java the value of the PDFData parameter is null.  I've debugged into the JS and the pdfXML param of the js method CallApplet <em>definitely</em> has content.</p>
  
  <p>I've also tried to add a param tag in to the applet tag and set its value before calling the applet and used GetParameter() from inside the applet.  This results in a blank string rather than a null.</p>
  
  <p>This problem doesn't occur on every machine.  Our QA department don't get this for example but since this is a client-side issue, one of our customers will probably see this.</p>
  
  <p>I'm utterly out of ideas here so any help would be appreciated (with the obvious proviso that sadly I need to get this working rather than re-engineer this and the legacy systems the applet communicates with to avoid using an applet.)</p>