Using JavaScript in HomeSite 4.0, Part I: The Application Object's Methods, Part III
Using JavaScript in HomeSite 4.0, Part I
The Application Object's Methods, Part III
GetURLStatus(URL, serverResponse) | Integer |
Returns the HTTP status code for the given URL. The text of the server response is returned in the second parameter (serverResponse
). For example, the following statement returns 200:
app.GetURLStatus("https://www.webreference.com/index.html", serverResponse)
The next expression evaluates to 400, because the specified file doesn't exist:
app.GetURLStatus("https://www.webreference.com/error400.html", serverResponse)
HideProgress() | None |
Hides the progress bar. This method doesn't require any arguments. It merely performs a simple operation. Take a look at the status area when the progress bar is hidden:
HTMLConvertTagCase(HTMLString, conversionFlag) | String |
Converts the case of the given string to uppercase, if conversionFlag
receives a true value. Alternatively, if the second parameter is handed a false value, the method converts the string to lowercase. Note that the HTMLConvertTagCase()
method doesn't change the contents of <SCRIPT>...</SCRIPT>
, <STYLE>...</STYLE>
or <!-- -->
tags, and doesn't change the case of attribute values. Notice that the function returns the new, converted string. Attribute values must be enclosed in double quotes.
HTMLGetAttribute(tag, attribute) | String |
Extracts the value of a given attribute (attribute
) from a given tag (tag
). For example, the following statement returns "250"
:
app.HTMLGetAttribute('<IMG SRC="car.gif" WIDTH="250">', "WIDTH")
Keep in mind that HTML is case-insensitive, so the following statement returns the same value:
app.HTMLGetAttribute('<IMG SRC="car.gif" WIDTH="250">', "WiDtH")
Produced by Yehuda Shiran and Tomer Shiran
Created: September 13, 1999
Revised: September 13, 1999
URL: https://www.webreference.com/js/column48/appmet3.html