MACROMEDIA DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER Spécifications Page 164

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 504
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 163
164 Insert Bar Objects
// do some document manipulation here. Exercise left to the reader
}
return errMsg;
}
objectTag()
Description
The objectTag() and insertObject() functions are mutually exclusive: If both are defined
in a document, the
objectTag() function is used. For more information, see “insertObject()”
on page 162.
This function inserts a string of code into the user’s document. In Dreamweaver MX,
returning an empty string, or a
null value (also known as "return;"), is a signal to
Dreamweaver to do nothing.
In Dreamweaver 4, if the focus is in Code view and the selection is a range (meaning that it is
not an insertion point), the range is replaced by the string that the
objectTag() function
returns. This is the value
true, even if the objectTag() function returns an empty string or
returns nothing. The
objectTag() function returns an empty string or a null value because
edits to the document have already been made manually. Otherwise, double quotation marks
(" ") often delete the edit by replacing the selection.
Arguments
None.
Returns
Dreamweaver expects the string to insert into the user’s document.
Example
The following example of the objectTag() function inserts an OBJECT/EMBED combination
for a specific ActiveX control and plug-in:
function objectTag() {
return '\n' +
'<OBJECT CLASSID="clsid:166F1OOB-3A9R-11FB-8075444553540000" \n'¬
+ 'CODEBASE="http://www.mysite.com/product/cabs/¬
myproduct.cab#version=1,0,0,0" \n' + 'NAME="MyProductName"> \n' ¬
+ '<PARAM NAME="SRC" VALUE=""> \n' + '<EMBED SRC="" HEIGHT="" ¬
WIDTH="" NAME="MyProductName"> \n' + '</OBJECT>'
}
NOTE
The assumption is that edits have been made manually before the return statement, so
doing nothing in this case is not equivalent to clicking Cancel.
Vue de la page 163
1 2 ... 159 160 161 162 163 164 165 166 167 168 169 ... 503 504

Commentaires sur ces manuels

Pas de commentaire