MACROMEDIA DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER Spezifikationen Seite 283

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 504
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 282
A simple Property inspector example 283
z-index:16; left: 44px; top: 5px">Marquee</SPAN>
<!-- If your form fields are in different layers, you must ¬
create a separate form inside each layer and reference it as ¬
shown in the inspectSelection() and setInterjectionTag() ¬
functions. -->
<SPAN ID="topLayer" STYLE="position:absolute; z-index:1; left: 125px; ¬
top: 3px; width: 431px; height: 32px">
<FORM NAME="topLayerForm">
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0">
<TR>
<TD VALIGN="baseline" ALIGN="right">Direction:</TD>
<TD VALIGN="baseline" ALIGN="right">
<SELECT NAME="marqDirection" STYLE="width:86"
onChange="setMarqueeTag()">
<OPTION VALUE="left">Left</OPTION>
<OPTION VALUE="right">Right</OPTION>
</SELECT>
</TR>
</TABLE>
</FORM>
</SPAN>
5.
Save the file as marquee.htm in the Configuration/Inspectors folder.
Writing the JavaScript code
You need to add JavaScript functions to make sure you can inspect the selection, to inspect the
selection, and to enter the appropriate values in the Property inspector.
To write the JavaScript code:
1. Create a new blank file.
2. To specify that the Property inspector appears whenever the selection contains the MARQUEE
tag, add the following function:
function canInspectSelection(){
return true;
}
3.
To refresh the value of the direction attribute that appears in the text field, add the
following function at the end of the file:
function inspectSelection(){
// Get the DOM of the current document.
var theDOM = dw.getDocumentDOM();
// Get the selected node.
var theObj = theDOM.getSelectedNode();
Seitenansicht 282
1 2 ... 278 279 280 281 282 283 284 285 286 287 288 ... 503 504

Kommentare zu diesen Handbüchern

Keine Kommentare