Adobe 38040334 - Dreamweaver CS3 User Manual page 544

Pc
Hide thumbs Also See for 38040334 - Dreamweaver CS3:
Table of Contents

Advertisement

DREAMWEAVER CS3
537
User Guide
Example of information stored in session variables
You're working on a site with a large audience of senior citizens. In Dreamweaver, add two links to the Welcome
screen that let users customize the size of the site's text. For larger, easy-to-read text, the user clicks one link, and for
regular-size text, the user clicks another link.
Each link has a URL parameter called
that submits the user's text preference to the server, as the following
fontsize
Macromedia ColdFusion® from Adobe example shows:
<a href="resort.cfm?fontsize=large">Larger Text</a><br>
<a href="resort.cfm?fontsize=small">Normal Text</a>
Store the user's text preference in a session variable and use it to set the font size on each page the user requests.
Near the top of the destination page, enter the following code to create a session called
that stores the
font_pref
user's font size preference.
ColdFusion
<CFSET session.font_pref = url.fontsize>
ASP and ASP.NET
<% Session("font_pref") = Request.QueryString("fontsize") %>
When the user clicks the hypertext link, the page sends the user's text preference in a URL parameter to the desti-
nation page. The code on the destination page stores the URL parameter in the
session variable. For the
font_pref
duration of the user's session, all the pages of the application retrieve this value and display the selected font size.
September 4, 2007

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents