Tombstone Tuning
Home of tuning, projects and fast cars and boats.
Tombstone Tuning
Home of tuning, projects and fast cars and boats.
Navigation
Site Breadcrumb - You are here
ReferenceJavaScript Code Library
Set Environment Variables command
This command allows you to set temporary
values for environment variables.
For example, if you wanted to see what your page would look like to someone
using a particular browser, you could set the HTTP_USER_AGENT (the environment
variable that specifies the browser being used). There are a number of other
variables that can be set as well.
While you're in Dreamweaver (or using
the "Preview in browser" command"), your page will work as if
these were the actual environment variables, but once you save your page and
leave Dreamweaver, these variables will no longer be set.
How to use the command
The dialog box for this command has two tabs at the top, marked "Browser"
and "Advanced." Since the most common reason many people use
environment variables is to check which browser is being used to view the page,
the default mode for this command is "Browser" mode. This mode makes
it easy to set the HTTP_USER_AGENT variable to various versions of Netscape
or Internet Explorer. Just select the browser, version, and platform you want
to set and click "OK."
If you want to specify other environment
variables, or enter a different value for the HTTP_USER_AGENT, you'll need to
use "Advanced" mode. To do so, click on the "Advanced" tab
at the top of the dialog box.
Advanced mode The box on the left lists
all the variables that will be set. When you highlight a variable in the list,
its name and value appear in the text boxes on the right. To change a value,
simply edit it in the box. To add a new variable, click the
button and fill in the new name and value in the text boxes. To subtract the
highlighted variable from the list, click the
button. Once you're happy with the list of variables and their values, click
"OK" to set them.
If at any point you want to revert
to the default list of environment variables, you can click the "Default"
button. (If you want to permanently change the default list, you'll have to
edit the "XSSI - Default Envars.js" file in the Dreamweaver/Configuration/Commands/
directory).
For more information about using
environment variables with XSSI, take a look at Electric Types
Introduction to XSSI.