6 Replies Latest reply: Aug 25, 2006 3:25 AM by (Steve_Woodruff) RSS

    Insert Script Object?

    John.Kordas Community Member
      In Acrobat Pro you can create a document script as follows:

      function Hello()
      {
      app.alert("Hello World")
      }

      And call this Hello.

      If you create button on the page then create an action on Mouse Up Run a JavaScript which looks like this:

      Hello();

      A message box appears saying Hello World click OK and press the button and it keeps coming back.

      Now in Designer this is a little different.

      I create a new page, insert a script object rename it to Hello and type:

      function Hello()
      {
      app.alert("Hello World")
      }

      I then create a button and on the mouse up action type;

      Hello();

      If I try this I get the following mesaage:

      TypeError: Hello is not a function
      1:XFA:form1[0]:#subform[0]:Button1[0]:mouseUp

      Why is it so?

      Even removing the script object and going to the Form properties Variables tab and entering the function script there does not seem to work.