Specifications

Chapter 19242
3 At the end of the translateMarkup() function, comment out the return
whateverTheReturnValueIs line, and replace it with
dreamweaver.getDocumentDOM().documentElement.outerHTML =
whateverTheReturnValueIs
:
// return theCode;
dreamweaver.getDocumentDOM().documentElement.outerHTML = ¬
theCode;
}
/* end of translateMarkup() */
4
In the BODY of the document, add a form with no text boxes:
<body>
<form>
Hello.
</form>
</body>
5
Restart Dreamweaver and select your translator command from the Commands menu. When
you click OK, the
translateMarkup() function is called, simulating translation.
If no error message appears and translation still fails, you probably have a logic error in your code.
6 Add alert() statements in strategic spots throughout the translateMarkup() function so
you can make sure youre 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 in the alert() statements, choose your command from the Commands menu,
click Cancel, and choose it again. This reloads the command file and incorporates your changes.