0 Replies Latest reply on Mar 19, 2010 6:52 AM by rwi@rit

    Reader crash on "docClose"-Event JavaScript (want to submitForm on docClose)

    rwi@rit

      Hi,

       

      i have a script for a subform which calls an external ("C:\...\Reader\Javascripts") javascript-function which does a simple submitForm:

       

      External javascript looks like this:

       

      _______________________________________________________________________________


      trustedIdentity = app.trustedFunction( function (sProperty)
      {
      var iProperty = "";
      app.beginPriv();
      iProperty = identity[sProperty];
      app.endPriv();
      return iProperty;
      });


      postOnExit = app.trustedFunction(function(myForm)
      {
           app.beginPriv();
           
           var retn = myTestPost(myForm);

           app.endPriv();
      });


      myTestPost = app.trustPropagatorFunction(function(myForm)
      {
          app.beginPriv();
           
           // Document type
           var sendAs = "PDF";
           
           // Document to send
           var doc = event.target;

           // Url for posting somewhere
           var url = "http://localhost/postMyPdf#FDF";
           
           doc.submitForm( { cURL: url, cSubmitAs: sendAs } );
           
          app.endPriv();
      });

      _______________________________________________________________________________

       

       

      The subform call (which should execute the external script above) looks like this (created with Adobe LifeCycle Designer 8.0):

       

      _______________________________________________________________________________


      ----- data.Page1.aSubform::docClose - (JavaScript, Client) ----------

      event.target.postOnExit(event.target);

      _______________________________________________________________________________

       

       

      When i execute "event.target.postOnExit(event.target);" with a button click it works fine an causes no error but when i close the form or adobe reader (and the script is executed) it runs into an error.

       

      adobe_reader_crash_1.png

       

      adobe_reader_crash_2.png

       

      Had someone the same problem - is there a solution/workaround for this problem?

       

      Kind regards,

       

      richard