WMLScript Reference

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

Current chapter: Chapter 4 - Pragmas
Section 16 out of 34 total sections , Section 2 out of 3 sections in this chapter


External Files

You can use a Uniform Resource Locator (URL) to access a WMLScript 1.1 file. Use a 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 the function declarations, you can use just the resource name. For example:

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

};  

The following occurs in the example function call:

The use url pragma has its own name space for local names. However, the local names must be unique within any given file. WMLScript 1.1 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 is the URL that identifies the current file.

The specified URL must be escaped according to the URL escaping rules. No compile time automatic escaping, URL syntax, or URL validity checking is performed.


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


Part Number DKWS-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.