MACROMEDIA DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER Dokumentacja Strona 444

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 504
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 443
444 Data Translators
Creating the icon
Next, you create the icon for Poco tags.
To create the icon:
1. Create an image file that is 18 x 18 pixels for the Poco tags icon.
2. Save the file as poco.gif in the Configuration/ThirdPartyTags folder.
Creating the attribute translator
You create an HTML file that contains the functions necessary for the attribute translator.
To create the HTML file:
1. Create a new blank file.
2. Enter the following:
<html>
<head>
<title>Conditional Translator</title>
<meta http-equiv="Content-Type" content="text/html; charset=">
<script language="JavaScript">
/*************************************************************
* This translator handles the following statement syntaxes: *
* <# if (condition) then foo else bar #> *
* <# if (condition) then att="foo" else att="bar" #> *
* <# if (condition) then att1="foo" att2="jinkies" *
* att3="jeepers" else att1="bar" att2="zoinks" #> *
* *
* It does not handle statements with no else clause. *
*************************************************************/
var count = 1;
function translateMarkup(docNameStr, siteRootStr, inStr){
var count = 1;
// Counter to ensure unique mmTranslatedValues
var outStr = inStr;
// String that will be manipulated
var spacer = "";
// String to manage space between encoded attributes
var start = inStr.indexOf('<# if'); // 1st instance of Pound Conditional
code
// Declared but not initalized. //
var attAndValue;
// Boolean indicating whether the attribute is part of
Przeglądanie stron 443
1 2 ... 439 440 441 442 443 444 445 446 447 448 449 ... 503 504

Komentarze do niniejszej Instrukcji

Brak uwag