URL

A URL Utility object contains information about a URL string.

Supported Platform(s)

- BlackBerry OS 5.0+
- BlackBerry PlayBook
- Ripple Emulator

View Supported Platform Table

APIOS 5.0OS 6.0OS 7.0PlayBookRipple
getURLParameter Y Y Y YY
getURLParameterByIndex Y Y Y YY
host Y Y Y YY
port Y Y Y YY

Configuration Document Settings

To use all of the API described for this object, you must ensure the following settings are in your configuration document:


You must declare the feature element(s) below in your configuration document:

Feature IDOS 5.0OS 6.0OS 7.0PlayBookRipple
<feature id="blackberry.utils" /> Y Y Y YY

Permission Elements (PlayBook Only)
This API does not require a <permission> element to be declared in the configuration document of your BlackBerry WebWorks Application.

API Summary



Properties

getURLParameter


static String getURLParameter(key : String)

Supported Platform(s)

 - BlackBerry OS 5.0+
 - BlackBerry PlayBook
 - Ripple Emulator

Description

Obtain the value of a parameter by key.



Returns

An undefined object is returned if the key does not exist in the URL query.

Parameter Type Description
key String The key of the parameter to be retrieved.

getURLParameterByIndex


static String getURLParameterByIndex(index : Number)

Supported Platform(s)

 - BlackBerry OS 5.0+
 - BlackBerry PlayBook
 - Ripple Emulator

Description

Obtain the value of a parameter by index. The values are stored in the order they appear in the URL string.



Returns

An undefined object is returned if the index is invalid.

Parameter Type Description
index Number The index of the parameter to be retrieved.

Properties:


Property Type Description Supported Platform(s)
host Static
String
readonly
Host address in the URL string.
 - BlackBerry OS 5.0+
 - BlackBerry PlayBook
 - Ripple Emulator
port Static
Number
readonly
Port number in the URL string.
 - BlackBerry OS 5.0+
 - BlackBerry PlayBook
 - Ripple Emulator

Documentation generated by JsDoc Toolkit 2.4.0 on Sun Dec 30 2012 13:31:20 GMT-0500 (EST)