C.7. Using IFRAME Elements

An IFRAME (inline frame) functions as an HTML document within a Mechanical Wizard group. An IFRAME may contain any content, from static text to detailed user interface controls. IFRAMEs have full script access to the Mechanical Wizard, and therefore full access to the Mechanical application.

The Options group in the Insert Geometry panel demonstrates a simple user interface extension using an IFRAME. Other examples of IFRAME usage in the Mechanical application include the WDK: Tools group and "Tip of the Day."

IFRAMEs in the Mechanical Wizard provide a way to customize the Mechanical application without modifying the main user interface. IFRAMEs may be published on a network, enabling customized user interfaces for multiple users without requiring changes to each installation.

Working with IFRAMEs requires familiarity with HTML and JScript coding. See also Tutorial: Adding a Web Search IFRAME.

Security Restrictions

Due to the cross-frame scripting security model enforced by the web browser control, custom IFRAME HTML pages should reside in the same location as the Mechanical Wizard. IFRAME pages from a different domain as the parent page cannot access the parent via script.

IFRAME Toolkit

The WDK includes the following resources for developing IFRAMEs:

  • The file MechanicalWizard\WDK\Info_IFRAME.htm contains a template HTML document for an IFRAME. View the source for descriptions of recommended HTML elements and JScript functions.

  • The file MechanicalWizard\System\IFrame.js implements generic functions for use in IFRAMEs.

The following files demonstrate use of IFRAMEs:

  • MechanicalWizard\WDK\Tools_IFrame.htm contains implementation for the WDK: Tools IFRAME. See MechanicalWizard\WDK\Tools_Merge.xml for corresponding TaskML.

  • MechanicalWizard\Panels\InsertGeometry_IFrame.htm contains implementation for the Insert Geometry panel Options group. See MechanicalWizard\Panels\InsertGeometry.xml for corresponding TaskML.

  • MechanicalWizard\TipoftheDay\IFrame.htm contains implementation for Tip of the Day. See MechanicalWizard\Panels\Startup.xml for corresponding TaskML.