Using JavaScript in HomeSite 4.0, Part I: The Application Object's Methods, Part IV
Using JavaScript in HomeSite 4.0, Part I
The Application Object's Methods, Part IV
HTMLGetTitle(filename) | String |
Returns the title (<TITLE>returned value</TITLE>) of a given HTML document. The filename parameter must reflect a local file.
InputBox(caption, prompt, default) | String |
Displays a dialog box with a caption (caption), a prompt (prompt), and a default vaule (default). This method returns the user's input. The following code:
app.InputBox("Math Lesson", "460 + 40:", "???")
generates the following box:

IsFileOpen(fullPath) | Boolean |
Returns true if the given file (fullPath) is open, false otherwise. For example, if the file "E:\Tomer\column48\appmet1.html" is open, the following statement returns -1, a true value:
app.IsFileOpen("E:\\Tomer\\column48\\appmet1.html");
For some reason, HomeSite often uses -1 to specify a true value, rather than 1. However, since all integers, except 0, evaluate to true when used in a conditional expression, this isn't a problem.
IsFileModified(fullPath) | Boolean |
Returns -1 if the given file (fullPath) is open and has been modified since its last save, or 0 otherwise. or example, if the file "E:\Tomer\column48\appmet1.html" is open, the following statement returns -1, a true value:
app.IsFileModified("E:\\Tomer\\column48\\appmet1.html");
Produced by Yehuda Shiran and Tomer Shiran
Created: September 13, 1999
Revised: September 13, 1999
URL: http://www.webreference.com/js/column48/appmet4.html


