241
// is this document modified?
if (app.DocumentCache(idx).Modified)
sTable = ‘Yes’;
sTable = ‘</td><td>’;
// is this document read-only?
if (app.DocumentCache(idx).ReadOnly)
sTable = ‘Yes’;
// close row
sTable = ‘</td></tr>’ + newline;
}
sTable = n ‘</table>’;
// add a new document (False = don’t create from default template -
blank)
app.NewDocument(false);
// insert the table (note that the ActiveDocument will be the new
document
// created above)
app.ActiveDocument.InsertText(sTable, false);
// switch to browse mode
app.CurrentView = 2;
// wait for user to re-enter edit mode
while (app.CurrentView != 1) {
// Wait is a home-grown routine to make up for the loss of
// DoEvents in VBScript. it will pause for a given number of
// milliseconds without locking the interface
app.Wait(100);
}
// return to the original document
app.DocumentIndex = nCurrentIdx;
alert(‘Script Completed.’);
// function call example
function GetDisplayName(fname) {
if (fname == ‘’)
return ‘(untitled)’
else
return fname
}
</pre>
</body>
</html>
Summary of Contents for COLDFUSION 4.5
Page 1: ...Allaire Corporation Using ColdFusion Studio ColdFusion Studio 4 5 for Windows 95 98 NT4 2000...
Page 16: ...xvi Contacting Allaire...
Page 90: ...82...
Page 130: ...122...
Page 133: ...141 Two VTML tags CAT and E let you customize the content of these dialog boxes...
Page 182: ...190...