MACROMEDIA DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER Especificaciones Pagina 387

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 504
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 386
A simple data source example 387
var params = extPart.findInString("MyDatasource_DataRef",
expression);
if (params)
{
retArray[0] = params.sourceName;
retArray[1] = params.bindingName;
}
}
return retArray;
}
function deleteDynamicSource(sourceName, bindingName)
{
var siteURL = dw.getSiteRoot();
if (siteURL.length)
{
//For localized object name
if (sourceName != "MyDatasource")
{
sourceName = "MyDatasource";
}
dwscripts.deleteListValueFromNote(siteURL, sourceName, bindingName);
}
}
3.
Save this file MyDatasource.js in the Configuration/DataSources/ColdFusion.
Creating the supporting command files for user input
The addDynamicSource() function contains the command
dw.popupCommand("MyDatasrouce_Variable"), which opens a dialog box for the user to
enter a specific variable name. However, you still need to create the dialog box for
MyDatasource Variable.
To provide a dialog box for the user, you must create a new set of command files: a command
definition file in HTML and a command implementation file in JavaScript (for more
information about command files, see “How commands work” on page 167).
The command definition file tells Dreamweaver the location of the supporting
implementation JavaScript files as well as the form for the dialog box that the user sees. The
supporting JavaScript file determines the buttons for the dialog box and how to assign the
user input from the dialog box.
Vista de pagina 386
1 2 ... 382 383 384 385 386 387 388 389 390 391 392 ... 503 504

Comentarios a estos manuales

Sin comentarios