404
Dynamic Documents
Live Data mode lets you view a web page in the design stage (as if it has been translated by the
application server and returned). Generating dynamic content to display in Design view lets
you view your page layout with live data and adjust it, if necessary.
Before you view live data, you must enter Live Data settings for any URL parameters that you
reference in your document. This prevents the web server from returning errors for
parameters that are otherwise undefined in the simulation.
You enter the URL parameters in name-value pairs. For example, if you reference the URL
variables
ID
and
Name
in server scripts in your document, you must set these URL parameters
before you view live data.
You can enter Live Data settings through Dreamweaver in the following ways:
■
Through the Live Data Settings dialog box, which you can activate from the View menu
■
In the URL text field that appears at the top of the document when you click the Live
Data View button on the toolbar
For the
ID
and
Name
parameters, you can enter the following pairs:
ID
22
Name
Samuel
In the URL, these parameters would appear as shown in the following example:
http://someURL?ID=22&Name=Samuel
This function lets you obtain these live data settings through JavaScript.
Arguments
None.
Returns
An array that contains the URL parameters for the current document. The array contains an
even number of parameter strings. Each two elements form a URL parameter name-value
pair. The even element is the parameter name and the odd element is the value. For example,
getLiveDataParameters()
returns the following array for the
ID
and
Name
parameters in
the preceding example:
['ID,'22','Name','Samuel']
.
Example
The following example returns the parameters that are specified as Live Data settings and
stores them in the
paramsArray
:
var paramsArray = dreamweaver.getLiveDataParameters();
000_DW_API_Print.book Page 404 Wednesday, July 20, 2005 11:58 AM
Summary of Contents for DREAMWEAVER 8-DREAMWEAVER API
Page 1: ...Dreamweaver API Reference...
Page 16: ......
Page 28: ...28 The File I O API...
Page 38: ...38 The HTTP API...
Page 68: ...68 Flash Integration...
Page 100: ...100 The Database API...
Page 116: ...116 The JavaBeans API...
Page 144: ...144 The Source Control Integration API...
Page 146: ......
Page 254: ...254 Workspace...
Page 298: ...298 Site...
Page 354: ...354 Document...
Page 396: ...396 Page Content...
Page 488: ...488 Design...
Page 550: ...550 Code...