URL
A URL Utility object contains information about a URL string.
Supported Platform(s)
- BlackBerry OS 5.0+
- BlackBerry PlayBook
- Ripple Emulator
| API | OS 5.0 | OS 6.0 | OS 7.0 | PlayBook | Ripple |
|---|---|---|---|---|---|
| getURLParameter | Y | Y | Y | Y | Y |
| getURLParameterByIndex | Y | Y | Y | Y | Y |
| host | Y | Y | Y | Y | Y |
| port | 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 ID | OS 5.0 | OS 6.0 | OS 7.0 | PlayBook | Ripple |
|---|---|---|---|---|---|
| <feature id="blackberry.utils" /> | Y | Y | Y | Y | Y |
| Permission Elements (PlayBook Only) |
|---|
| This API does not require a <permission> element to be declared in the configuration document of your BlackBerry WebWorks Application. |
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)