WMLScript Developer's Guide

[Cover] [Previous Section] [Next Section] [Index]

Current chapter: Chapter 5 - Pragmas
Section 24 out of 57 total sections , Section 2 out of 4 sections in this chapter


External Files

You can use a Uniform Resource Locator (URL) to access a WMLScript file. Use the use url pragma to call a function in an external file. For example:

use url OtherScript "http://www.host.com/app/script";  

To call an external file, you must specify the following:

Then, inside function declarations, use the resource name. For example:

function test (par1, par2) {  
    return OtherScript#check (par1-par2);  
}  

The example function call demonstrates these principles:

The use url pragma has its own namespace for local names. However, the local names must be unique within any given file. WMLScript supports URLs and relative URLs without a hash mark (#) or a fragment identifier. For more information, visit:

http://info.internet.isi.edu/in-notes/rfc/files/rfc2396.txt  

For relative URLs, the base URL identifies the current file. The specified URL must be escaped according to the URL escaping rules. WMLScript performs no compile-time automatic escaping, URL syntax, or URL validity checking.


[Cover] [Previous Section] [Next Section] [Index]


Part Number DKDS-41-002, UP.SDK Release 4.1, December 2000

Copyright © 1994-2000 Openwave Systems Inc. All rights reserved.
Please send comments and questions to sdk-doc-comments@openwave.com.