isPlainHostName() (Function/proxy.pac)

This is a convenience function for use with proxy.pac files.

Availability:

JavaScript - 1.2
Netscape - 4.0
Property/method value type:Boolean primitive
JavaScript syntax:NisPlainHostName(aHostname)
Argument list:aHostnameThe name of a host to check

This function will check to see if the passed in hostname parameter is just a host name on its own or if it has a full domain specified too. This functionality can probably be simulated outside of a proxy.pac file by testing for the existence of a full stop within the passed host name parameter.

This function returns true if the hostname parameter contains a plain host name with no domain specified. If the hostname parameter specifies a domain as well then this method returns false.

See also:FindProxyForURL(), isInNet(), proxy.pac

Cross-references:

Wrox Instant JavaScript - page - 58