Operation Manual
625
USING DREAMWEAVER
Building forms
Last updated 3/28/2012
In this example workflow, the application is a web-based storefront. Because the developers of the site want to reach
the widest possible audience, the site is designed to support foreign currencies. When users log in to the site, they can
select the currency in which to view the prices of the available items.
1 The browser requests the report.cfm page from the server. The request includes the URL parameter
Currency="euro". The Currency="euro" variable specifies that all monetary amounts retrieved be displayed as the
European Union euro.
2 The server temporarily stores the URL parameter in memory.
3 The report.cfm page uses the parameter to retrieve the cost of items in euros. These monetary amounts can either
be stored in a database table of different currencies, or converted from a single currency associated with each item
(any currency supported by the application).
4 The server sends the report.cfm page to the browser and displays the value of items in the requested currency.
When this user ends the session, the server clears the value of the URL parameter, freeing server memory to hold
new user requests.
URL parameters are also created when the HTTP GET method is used in conjunction with an HTML form. The GET
method specifies that the parameter value be appended to the URL request when the form is submitted.
Typical uses of URL parameters include personalizing websites based on user preferences. For example, a URL
parameter consisting of a user name and password can be used to authenticate a user, displaying only information
that user has subscribed to. Common examples of this include financial websites that display individual stock prices
based on stock market symbols the user has previously chosen. Web application developers commonly use URL
parameters to pass values to variables within applications. For example, you could pass search terms to SQL
variables in a web application to generate search results.
Creating URL parameters using HTML links
You create URL parameters within an HTML link by using the href attribute of the HTML anchor tag. You can enter
the URL parameters directly in the attribute in Code view (View
> Code), or by appending the URL parameters at the
end of the link URL in the Property inspector Link box.
In the following example, three links create a single URL parameter (action) with three possible values (Add, Update,
and
Delete). When the user clicks a link, a parameter value is sent to the server, and the requested action is performed.
Currency="€"
<HTML>
<code>
</HTML>
http://www.mysite.com/
report.cfm?Currency="€"
report.cfm
Web browser
WEB SERVER