TEST.ASP ------------------- %@Language=JScript%> !--#include file="Template.JScript.INC"--> % var tpl = new Template("c:\\Inetpub\\wwwroot"); var str=""; var i;
function Template_Load(name,filename) { var fso = new ActiveXObject("Scripting.FileSystemObject"); var file = fso.BuildPath(this.TplPath, filename); if(fso.FileExists(file)) { var f = fso.OpenTextFile(file, 1); this[name] = f.ReadAll(); } }
//Template Constructor
function Template(path) { //Property this.TplPath = path;