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

Current chapter: Introduction to HDML
Section 12 out of 67 total sections , Section 6 out of 7 sections in this chapter


Using variables to return information to your application

There are two ways you can return variable information to your application:

It is strongly recommended that you return variable information in POST data instead of query string arguments. This allows the UP.Link server to perform any necessary transcoding of data from the UP.Phone's character set to a character set understood by your application. For more information on character set and internationalization issues see Chapter 9.

The following section describe the two methods of returning information to your application.



Returning variable data as POST data

The following HDML allows the user to enter a stock symbol; it then generates a URL request with the stock symbol specified in an argument. This interface is shown in Figure 1-13.

FIGURE  1-13.     Setting POST data with variables

Suppose we want to allow the user to choose from a list of stocks instead of entering one. To do this, we could modify the previous example as follows:

FIGURE  1-14.     Setting POST data with variables



Returning data in query string arguments

Suppose you want to implement the interface shown in Figure 1-13 using query string arguments instead of POST data. The following HDML demonstrates how to do this.

FIGURE  1-15.     Setting query string arguments with variables


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

Current chapter: Introduction to HDML
Section 12 out of 67 total sections , Section 6 out of 7 sections in this chapter


1 The GOSUB task is similar to the GO task. Chapter 2 describes GOSUB in detail.
Copyright © 1999, Unwired Planet, Inc. All rights reserved.