JS_VISION.cfm is a ColdFusion custom tag that allows the user to specify which JavaScript Vision modules that are needed with a Web page. The custom tag will ensure that all the proper JavaScript Vision .js files are accessible to the Web page. (The tag takes the work out of knowing and coding the dependencies amongst the .js files.)

JavaScript Vision Dependencies
JavaScript Vision Dependencies

Syntax

<CF_JS_VISION ...>


or

<CFMODULE TEMPLATE="JS_VISION.cfm" MODULE="" USE="" MODULEPATH="">
or
<CFMODULE TEMPLATE="JS_VISION.cfm" USE="" MODULEPATH="" ALL="Yes | No" CHARACTER="Yes | No" ...>

Attributes

Remarks

To obtain a copy of the JavaScript Vision custom ColdFusion tag, right click on JS_VISION.zip. In Microsoft Internet Explorer, select Save Target As...; in Netscape Navigator, select Save Link As.... You'll then get a dialog box asking you where you want to save the custom tag file. Select a folder on your hard drive and click OK. The custom tag and editor files are now in that folder!

For more information on the SRC attribute of the SCRIPT tag, see JavaScript Vision Frequently Asked Questions.

When STRING is selected as one of the modules to be included, the JSV_Vision_String4.js file is included along with the JSV_Vision_String.js file but the SCRIPT tag's LANGUAGE attribute is set to JavaScript1.2 as shown below

<SCRIPT TYPE="text/javascript"
           LANGUAGE="JavaScript1.2"
           SRC="http://home.caprock.net/gkrajci/JSV/JS_Vision_String4.js"></SCRIPT>

Similarly, when WINDOWMGMT is selected as one of the modules to be included, the JSV_Vision_WindowMgmt2.js file is included along with the JSV_Vision_WindowMgmt.js file but the SCRIPT tag's LANGUAGE attribute is set to JavaScript1.2 as shown below

<SCRIPT TYPE="text/javascript"
           LANGUAGE="JavaScript"
           SRC="http://home.caprock.net/gkrajci/JSV/JSV_Vision_WindowMgmt.js"></SCRIPT>
<SCRIPT TYPE="text/javascript"
           LANGUAGE="JavaScript1.2"
           SRC="http://home.caprock.net/gkrajci/JSV/JSV_Vision_WindowMgmt2.js"></SCRIPT>

The functions in the JSV_Vision_WindowMgmt2.js and JS_Vision_String4.js are used in JavaScript version 1.2, or better, browsers. (See the table in the How do I work around the limitations of the JavaScript getYear method? FAQ.)

Example

If you are interested in including (i.e., using CFINCLUDE) all the JavaScript Vision .js files that deal with window management, you might use

<CFMODULE TEMPLATE="JS_VISION.cfm" USE="INCLUDE" MODULE="windowmgmt">

and the custom tag would place the JS_Vision_Globals.js, JS_Vision_String.js, JS_Vision_String4.js, JS_Vision_HTML.js, JS_Vision_Numeric.js, and JS_Vision_WindowMgmt.js files, surrounded by the SCRIPT tag, in the Web page.

If you want to link to the files so they are not included (i.e., using the SRC attribute of the SCRIPT tag) in the Web page, then change the USE attribute to LINK and specify the MODULEPATH attribute.

<CFMODULE TEMPLATE="JS_VISION.cfm"
          USE="LINK"
          MODULE="field,windowmgmt"
          MODULEPATH="http://home.caprock.net/gkrajci/JSV/">
or
<CFMODULE TEMPLATE="JS_VISION.cfm"
          USE="LINK"
          FIELD="Yes"
          WINDOWMGMT="Yes"
          MODULEPATH="http://home.caprock.net/gkrajci/JSV/">

The custom tag would then place the following HTML SCRIPT tags in the Web page

<SCRIPT TYPE="text/javascript"
        LANGUAGE="JavaScript"
        SRC="http://home.caprock.net/gkrajci/JSV/JS_Vision_Globals.js"></SCRIPT>
<SCRIPT TYPE="text/javascript" 
        LANGUAGE="JavaScript" 
        SRC="http://home.caprock.net/gkrajci/JSV/JS_Vision_Character.js"></SCRIPT>
<SCRIPT TYPE="text/javascript" 
        LANGUAGE="JavaScript" 
        SRC="http://home.caprock.net/gkrajci/JSV/JS_Vision_String.js"></SCRIPT>
<SCRIPT TYPE="text/javascript" 
        LANGUAGE="JavaScript1.2" 
        SRC="http://home.caprock.net/gkrajci/JSV/JS_Vision_String4.js"></SCRIPT>
<SCRIPT TYPE="text/javascript" 
        LANGUAGE="JavaScript" 
        SRC="http://home.caprock.net/gkrajci/JSV/JS_Vision_Numeric.js"></SCRIPT>
<SCRIPT TYPE="text/javascript" 
        LANGUAGE="JavaScript" 
        SRC="http://home.caprock.net/gkrajci/JSV/JS_Vision_HTML.js"></SCRIPT>
<SCRIPT TYPE="text/javascript" 
        LANGUAGE="JavaScript" 
        SRC="http://home.caprock.net/gkrajci/JSV/JS_Vision_Field.js"></SCRIPT>
<SCRIPT TYPE="text/javascript" 
        LANGUAGE="JavaScript" 
        SRC="http://home.caprock.net/gkrajci/JSV/JS_Vision_WindowMgmt.js"></SCRIPT>
<SCRIPT TYPE="text/javascript" 
        LANGUAGE="JavaScript1.2" 
        SRC="http://home.caprock.net/gkrajci/JSV/JS_Vision_WindowMgmt2.js"></SCRIPT>