Section 10.5.  Launching Script Editor

Prev don't be afraid of buying books Next

10.5. Launching Script Editor

In our previous example, we used Script Editor to create the simple script function. Script Editor is a separate application that is launched from Info-Path when the user needs to create or edit a script function. In our example, we launched it from the Button Properties dialog, and it automatically created an empty function associated with that button.

There are a number of other ways to launch Script Editor, depending on the event that will trigger the function to be executed:

  • If you are creating a script function associated with validation or modification of a particular field, you can launch Script Editor from the field's Data Validation dialog. This is explained in 10.7.2, "Launching Script Editor", on page 239.

  • If you are creating a script function for the OnLoad or OnSwitchView event, you can click either of these events on the Script submenu of the Tools menu, shown in Figure 10-4.

    Figure 10-4. The Script submenu




  • If you are creating a script function for the OnSubmitRequest event, you can launch Script Editor from the Submitting Forms dialog that was described in 9.3.8, "Allowing users to submit forms", on page 220.

In all these cases, InfoPath creates an empty "stub" function for you, and you just need to fill in the function body. Script Editor can also be launched directly from the Script submenu of the Tools menu.

Amazon


XML in Office 2003. Information Sharing with Desktop XML
XML in Office 2003: Information Sharing with Desktop XML
ISBN: 013142193X
EAN: 2147483647
Year: 2003
Pages: 176

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net