Script
Use the Script part to create a placeholder for a JavaScript. Multiple scripts can be dropped throughout the document. Scripts can be added to the of an HTML document by modifying the #scripts attribute of the Html Page
To add a Script part, select the Web Connection Category ( Web Connection Category), then the Script part ( Script icon). You can also add the part using the Add Part dialog and specifying the class name, AbtHtmlScript.
Script Properties
The Script part has the following properties:
string
url
extraAttributes
Use the extraAttributes property to specify any additional HTML attributes that you want included in the HTML tagging generated by the part. You can use this property to include HTML attributes that are not directly supported by VA Smalltalk.
language
Use the language property to specify what scripting language used to create the Script. Valid values include:
JavaScript
VBScript
JavaScript1.1
You can also enter another language if necessary.
partName
In the Part name field, type the name you want to use to describe the part. For non-visual parts, this text appears under the icon for the part on the free-form surface.
The name of the part can consist of alphanumeric characters, and must be unique from all other parts on the layout surface.
This field is optional. If you do not specify a part name, VA Smalltalk generates a unique name based on the class name of the part.
sourceFileName
Use the sourceFileName property to specify the name of a file where your script is stored. Use this property instead of the string property if you have a script that is long or maintained outside of VA Smalltalk. When you specify a local source file for your script, VA Smalltalk imports the script inline when generating HTML.
The sourceFileName property will not work properly at runtime unless the application AbtWebServerInterfaceBaseFileApp is included in the packaged image. Therefore, the sourceFileName property should not be used for applications that are packaged in an XD image since AbtWebServerInterfaceBaseFileApp is not present. Use the url attribute instead.
string
Use the string property to specify a script. Use this property when your script is small and you want it generated in line with the HTML.
url
Use the url property to specify the location on a server of a file where your script is stored. Use this property if you have a script that is long and maintained outside of VA Smalltalk on a server. When you specify a URL location for the file containing your script, the Web browser will call and execute the script when rendering the HTML. VA Smalltalk generates a retrieve to the script in the HTML <script> tag.
Last modified date: 06/24/2018