Sunday November 19, 2017

       
      SteelArrow Basics
      SteelArrow Tags
  SteelArrow Functions
  SteelArrow Objects
  Advanced Topics
  WAS Overview
   
   
       
      Overview
  Code Samples
  Site Search
   
   
   


Get SteelArrow!     
  <SAIMPORT>    
 
 
Secure Tag
Return to Tag List
 
The IMPORT tag is used to call a FUNCTION or to import an external HTML file or SteelArrow script.

Imported SteelArrow scripts have access to all variables defined before the IMPORT call, and may also receive data passed using the PARAM tag. As well, if INCLUDE="yes" is specified any variables defined within the imported page will be included in the callers namespace.

For security reasons IMPORT only supports the import of HTML or SteelArrow scripts, and does not support absolute file paths.

Note: IMPORT supports "virtual" paths. These paths can be configured by the system administrator.

 
Attributes:
FUNCTIONvariable or literal string (function to call)
FILEvariable or literal string (file to import; relative to current directory or a virtual directory)
NAMEvariable to store result of import
INCLUDEtreat imported page as an include page; "yes" or "no" (default)
QUIETreturn false instead of an error if the file doesn't exist; "yes" or "no" (default)

 
The following is an example of IMPORT;
 
<SAFUNCTION NAME="Sum">
   <SARETURN VALUE=PARAM.val1 + PARAM.val2>
</SAFUNCTION>

<SAIMPORT FUNCTION="Sum" NAME=returnValue>
   <SAPARAM NAME=val1 VALUE=10>
   <SAPARAM NAME=val2 VALUE=22>
</SAIMPORT>

<!--- Outputs: 32 --->
<SAOUTPUT VALUE=returnValue>

<SAIMPORT FILE="..\banner.html"></SAIMPORT>

<!--- An example using a virtual path --->
<SAIMPORT FILE="\common\banners\banner.html"></SAIMPORT>





Copyright © 1998-2004 Tomahawk Technologies Inc.
Privacy Policy