6.
Add
statements in strategic spots throughout the
alert()
so you can make sure you're getting the proper branches and so you can check the values
of variables and properties at different points:
for (var i=0; i< foo.length; i++){
alert("we're at the top of foo.length array, and the value ¬
of i is " + i);
/* rest of loop */
}
7.
After adding the
click Cancel, and select it again. This process reloads the command file and incorporates
your changes.
A simple attribute translator example
To better understand attribute translation, it's helpful to look at an example. The following
translator is Pound Conditional (Poco) markup, a syntax that's somewhat similar to ASP or
PHP.
You create the attribute translator by performing the following steps:
Creating the tagspec tag
Creating the icon
Creating the attribute translator
Creating the tagspec tag
The first step in making this translator work properly is to create a
markup, which prevents Dreamweaver from parsing the untranslated Poco statements.
To create the tagspec tag:
1.
Create a new blank file.
2.
Enter the following:
<tagspec tag_name="poco" start_string="<#" end_string="#>" ¬
detect_in_attribute="true" icon="poco.gif" icon_width="17" ¬
icon_height="15"></tagspec>
3.
Save the file as poco.xml in the Configuration/ThirdPartyTags folder.
statements, select your command from the Commands menu,
alert()
translateMarkup()
tagspec
A simple attribute translator example
function
tag for Poco
443
Need help?
Do you have a question about the DREAMWEAVER 8-EXTENDING DREAMWEAVER and is the answer not in the manual?