MACROMEDIA DREAMWEAVER 8-DREAMWEAVER API Specifiche Pagina 242

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 692
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 241
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.
Vedere la pagina 241
1 2 ... 237 238 239 240 241 242 243 244 245 246 247 ... 691 692

Commenti su questo manuale

Nessun commento