Using JavaScript in HomeSite 4.0, Part I: The Application Object's Methods, Part IX | WebReference

Using JavaScript in HomeSite 4.0, Part I: The Application Object's Methods, Part IX


Using JavaScript in HomeSite 4.0, Part I

The Application Object's Methods, Part IX

StatusError(message) None

Sets an error message in the Status bar. The message (message) is displayed on a red background for at least 5 seconds. Here is how the Status bar looks when we execute StatusError("How are you today?"):

An Error
StatusWarning(message) None

Sets a warning message in the Status bar. The message (message) is displayed on a blue background for at least 5 seconds. Here is how the Status bar looks when we execute StatusWarning("How are you today?"):

A Warning
TagCase(inputString) String

Changes the case of the given string (inputString) according to the "Lowercase all inserted tags" preference in HomeSite's "Options/Settings/HTML" tab. Attribute values are not modified. When the above preference is set to uppercase tags, the following expression:

app.TagCase('<form name="MyForm"></FORM>')

evaluates to:

<FORM NAME="MyForm"></FORM>

When the preference is lowercase tags, we'll get:

<form name="MyForm"></form>
Wait(milliSeconds) None

Waits a given number of milliseconds (milliSeconds). Use it to allow access to the UI while executing a loop, for instance. Examine the following code:

var app = Application;
while (app.DocumentIndex != 1) {
  app.Wait(200);            
}

We need to change the file tab to number 1 (the second one) in order to exit the loop. That would be impossible without the Wait() command.

https://www.internet.com

Produced by Yehuda Shiran and Tomer Shiran

Created: September 13, 1999
Revised: September 13, 1999

URL: https://www.webreference.com/js/column48/appmet9.html