< Day Day Up > |
Most applications in the Office System 2003 Office Suite can use Visual Basic for Applications (VBA) to allow the development of custom applications. Some Office 2003 applications also allow scripting using the Microsoft Script Editor. InfoPath does not use VBA at all. Instead, it uses JScript or VBScript that can be coded using the Microsoft Script Editor. InfoPath uses JScript and VBScript because it uses the Internet Explorer rendering engine under the hood. InfoPath also dynamically creates HTML Web pages for display in the InfoPath form area. So, just as you can use VBScript or JScript to script parts of the HTML document object model in Internet Explorer, you can use those same languages to script the InfoPath object model. JScriptJScript is Microsoft's variant of ECMAScript. ECMAScript is the official term for what is often colloquially called JavaScript. Most InfoPath script examples are written in JScript. (To learn more about scripting when using InfoPath 2003, see Chapter 17, "Scripting in InfoPath.") VBScriptVBScript (officially named Visual Basic Scripting Edition) is a scripting language that, in the context of Web browsers, runs only on Internet Explorer on Windows. Because InfoPath uses the Internet Explorer rendering engine to render the dynamically created InfoPath views, VBScript works well. As you saw in Chapter 1, "Getting Started with InfoPath," if you want to use VBScript, you must take active steps to make VBScript the scripting language for an InfoPath form template. For this and other reasons, most InfoPath example code is written in JScript rather than VBScript. |
< Day Day Up > |