 |
 |
CGI Control |
Parent Tags: bar Tag Attributes: align, angle, bind, border, bordercolor, color, config, disicon, disable, download, downloadname, font, forecolor, get, grad, hide, height, icon, overicon, pattern, select, symbol, text, textalign, textsize, tie, upload, uploadname, width
|
|
The CGI control (a subclass of the Text control) manages communication
with a CGI script
on the server. It provides a general purpose 'form' mechanism that includes both file upload and
download, as well as enabling the posting of XML formatted mash data.
This control is most commonly used to create a 'save' button, which posts the XML data associated
with the current mash to the CGI specified in its url attribute. In order for the
mash and clip tags that make up the mash to be included in
the request, the mash attribute must be set to '1' and the tie
attribute set to 'player.mash'.
The referenced media
and font option tags can also be included in the request by setting the media attribute to '1' as well. This
generates what might be called a 'fat' mash - a self contained file that can be displayed in a
simple player.
Learn more in Mash Saving.
The control can also be used to create more generic forms, though the total amount of data that can
be passed to the CGI script is limited because parameters are sent via the GET method. To use this
approach the url attribute is dynamically populated with values from other controls in
the interface, or from the CGI control itself which supports binding to arbitrary properties.
Regardless of how the CGI control is initially configured, it can be partially reconfigured based on
the response it receives from the server side script. For instance, a javascript alert could be displayed
by returning a tag with its get attribute set to 'javascript:alert("Hello world!");'.
Or the Player could be activated by setting the trigger attribute to 'player.play'
and the value attribute to '1'.
If the response contains a url, upload or download attribute it will be requested without further user
interaction. A delay attribute can also be specified so the requests can be staggered if
needed. This mechanism allows one CGI script to trigger another and another, so a single process can
span over consecutive requests. This is useful for tracking asyncronous server tasks like processing
of media files after uploading. The control also supports the progress and
status attributes, which can be bound to a Slider and Text
control for visual feedback.
|
|
|
|
 |
|
|
 |