spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / experts / javascript / column48


Using JavaScript in HomeSite 4.0, Part I

Developer News
Microsoft Shows Off Silverlight 4, IE9 Plans
Metasploit Expands Vulnerability Test Framework
HyperCard Reborn?

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("http://www.webreference.com/index.html", serverResponse)

The next expression evaluates to 400, because the specified file doesn't exist:

app.GetURLStatus("http://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:

A Hidden Progress Bar

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")

http://www.internet.com

Produced by Yehuda Shiran and Tomer Shiran

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs

webref The latest from WebReference.com Browse >
Rolling Out Your Own HTML Application Version Control · HTML 5: Client-side Storage · Working with Ajax Server Extensions
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Wi-Fi Product Watch, November 2009 · Chip Market Recovering From '08 Collapse · Low-Cost Tools to Kickstart Your New Business


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

URL: http://www.webreference.com/js/column48/appmet3.html