URL

A URL Utility object contains information about a URL string.


Supported Platform(s)

- BlackBerry OS 5.0+
- BlackBerry PlayBook 1.0+
- Ripple Emulator
View Supported Platform Table
APIBB5.0BB6.0BB7.0PB1.0PB2.0BB10Ripple
getURLParameter Y Y Y Y Y  Y
getURLParameterByIndex Y Y Y Y Y  Y
host Y Y Y Y Y  Y
port Y Y Y Y Y  Y

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 IDBB5.0BB6.0BB7.0PB1.0PB2.0BB10Ripple
<feature id="blackberry.utils" /> Y Y Y Y Y  Y

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

Functions


Properties

String host
Number port

Functions

String getURLParameter (key : String)


Obtain the value of a parameter by key.


Supported Platforms
 - BlackBerry OS 5.0+
 - BlackBerry PlayBook 1.0+
 - Ripple Emulator


Parameters
key The key of the parameter to be retrieved.

Return:

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


String getURLParameterByIndex (index : Number)


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


Supported Platforms
 - BlackBerry OS 5.0+
 - BlackBerry PlayBook 1.0+
 - Ripple Emulator


Parameters
index The index of the parameter to be retrieved.

Return:

An undefined object is returned if the index is invalid.


Properties

readonly String host


Host address in the URL string.


Supported Platforms
 - BlackBerry OS 5.0+
 - BlackBerry PlayBook 1.0+
 - Ripple Emulator

readonly Number port


Port number in the URL string.


Supported Platforms
 - BlackBerry OS 5.0+
 - BlackBerry PlayBook 1.0+
 - Ripple Emulator

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Feb 11 2013 14:51:11 GMT-0500 (EST)