Parses the protocol, host, port, path, file and query properties for the specified URL.
<canvas height="220" debug="true">
<debug x="0" y="0" height="200" width="650"/>
<script>
var urlstring = 'http://localhost:8080/lps/lzurl_example.lzx?lzt=swf';
var url = new lz.URL(urlstring);
// list each part of this url
Debug.debug("protocol: %w", url.protocol);
Debug.debug("host: %w", url.host);
Debug.debug("port: %w", url.port);
Debug.debug("path: %w", url.path);
Debug.debug("file: %w", url.file);
Debug.debug("query: %w", url.query);
// list the url
Debug.debug("Complete URL: %w", url);
// Make it secure
url.protocol = 'https';
url.port = 8443;
Debug.debug("Secure URL: %w", url);
// Change the query string
url.query = 'lzt=source';
Debug.debug("New path: %w", url);
</script>
</canvas>
| Name (CSS property) | Type (tag) | Type (js) | Default | Category |
|---|---|---|---|---|
file
|
read/write | |||
fragment
|
read/write | |||
host
|
read/write | |||
path
|
read/write | |||
port
|
read/write | |||
protocol
|
read/write | |||
query
|
read/write | |||
Methods
Copyright © 2002-2010 Laszlo Systems, Inc. All Rights Reserved. Unauthorized use, duplication or distribution is strictly prohibited. This is the proprietary information of Laszlo Systems, Inc. Use is subject to license terms.