Quick References
ADO
ASP
CSS2
HTML
JavaScript
Jet SQL
VBScript
WML
WMLScript
WSH
XHTML
XML DOM
XSLT
Features
Knowledge Base
Tutorials
Partners
ZVON.ORG
XML
Planet Source Code
VisualBuilder
Web Design
Your HTML Source
XML/XSLT Forums
ASPAlliance
Scripts
Programmers Heaven
Tek-Tips Forums
Developer Fusion
Code Project
Dialogs library
Float library
Lang library
String library
WMLBrowser library
STANDARD LIBRARY: URL
The
URL Library
contains fourteen functions designed to manipulate URLs. For example, these functions can be used to return specific information about relative and absolute URLs, handle escape characters, create absolute URLs, and validate a URL syntax.
The syntax of a URL is:
scheme://host:port/path;parameters$query#fragment
You can use the following functions to get the various portions of the URL:
Portion
Function
scheme
getScheme(url)
host
getHost(url)
port
getPort(url)
path
getPath(url)
parameters
getParameters(url)
query
getQuery(url)
fragment
getFragment(url)
The library and function names are case sensitive.
The fourteen functions are:
escapeString
Replaces special characters with hexadecimal escape sequences.
Syntax:
URL.escapeString
(string)
getBase
Returns an absolute URL.
Syntax:
URL.getBase( )
getFragment
Returns the fragment portion of the URL.
Syntax:
URL.getFragment
(url)
getHost
Returns the host portion of the URL.
Syntax:
URL.getHost
(url)
getParameters
Returns the parameter portion of the URL.
Syntax:
URL.getParameters
(url)
getPath
Returns the path portion of the URL.
Syntax:
URL.getPath
(url)
getPort
Returns the port portion of the URL.
Syntax:
URL.getPort
(url)
getQuery
Returns the query portion of the URL.
Syntax:
URL.getQuery
(url)
getReferer
Returns the smallest relative URL.
Syntax:
URL.getReferer( )
getScheme
Returns the scheme portion of the URL.
Syntax:
URL.getScheme
(url)
isValid
Determines if the syntax of the URL is correct.
Syntax:
URL.isValid
(url)
loadString
Returns the content type based upon the provided absolute URL and content type/subtype.
Syntax:
URL.loadString
(url, contentType)
resolve
Returns an absolute URL given a base and embedded URL.
Syntax:
URL.resolve
(baseUrl, embeddedUrl)
unescapeString
Replaces hexadecimal escape sequences with the special characters they represent.
Syntax:
URL.unescapeString
(string)
Copyright 1999-2005 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information