Chapter 3 DynaScript Predefined Objects
Describes a Web site. Using the site
object,
you can manage documents and database connections in your site,
and customize the management interface to suit your needs.
To use a site property:
site.propertyName
To use a site method:
site.MethodName( parameter )
Only one site object allowed
You cannot create additional site
objects in your scripts.
Management of Dynamo Web sites is driven by
scripts. The site
object provides
methods that allow you to perform common management tasks:
In a Dynamo Web site, you can manage documents
and database connections either by using Sybase Central or by writing
your own scripts. In either case, the site
object
is responsible for the basic management tasks:
CreateDocument
, DeleteDocument
,
and GetDocument
.
CreateConnection
, DeleteConnection
,
and several GetConnection
variants.
Because the Dynamo management tools are script-based, you can alter these scripts or create new ones to tailor the interface to your needs:
CreateWizard
.
OnEvent
method.
This example creates a new connection called myConnection
,
and then creates a new document in the Web site to use the new connection.
The contents of the new document is the word "hello":
<!--SCRIPT
newConn = site.CreateConnection ( "MyConnection", "my new connection", "PowerDynamo Demo" );
newDoc = site.CreateDocument ( "/Site/myDoc.stm", "text", "my new document", "hello", "MyConnection" );
-->
For more information on the document
object,
see "document object".
For more information on the connection
object,
see "connection object".
Copyright © 1999 Sybase, Inc. All rights reserved. |