GoDiagram Web Reference
ScriptFile Property (GoView)

Gets or sets the URL of the file that contains the definitions of the JavaScript functions needed to provide interactive functionality in the browser.
Syntax
'Declaration
 
<DefaultValueAttribute()>
<DescriptionAttribute("the JavaScript file that holds function definitions used by the page in the browser")>
<EditorAttribute(EditorBaseTypeName="System.Drawing.Design.UITypeEditor, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", EditorTypeName="System.Web.UI.Design.ImageUrlEditor, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")>
Public Property ScriptFile As String
[DefaultValueAttribute()]
[DescriptionAttribute("the JavaScript file that holds function definitions used by the page in the browser")]
[EditorAttribute(EditorBaseTypeName="System.Drawing.Design.UITypeEditor, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", EditorTypeName="System.Web.UI.Design.ImageUrlEditor, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
public string ScriptFile {get; set;}

Property Value

This defaults to "GoWeb.js", which is the name of the standard JavaScript file supplied by GoDiagram. You will need to make sure this script file is present and accessible in your web site. If the value is the empty string, the RenderScript method will render the standard functions inline. When this value is a non-empty string, RenderScript simply generates <script src='...'></script>, using this property value as the SRC. When this value is null or the string "none", no script reference or inline definition is generated. A non-empty string should be a relative path; the tilde character is not supported.

Note that having different values for different GoViews on the same Page can produce inconsistent results. They should all be the same, so that the order in which the controls are rendered will not matter.

Remarks
The advantages of having a separate JavaScript file include avoiding the overhead of rendering and sending and parsing the function definitions with each page, caching of that file and those functions by the client, and the ease of modifying the functions to accomodate additional features and additional browsers. Disadvantages include confusion when multiple views have conflicting values, and possibly dealing with caching problems when modifying the file. GoDiagram provides a standard JavaScript file that you can use, named GoWeb.js, that you can copy from the GoDiagram Web Samples directory.
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

GoView Class
GoView Members

 

 


© 2013. Northwoods Software Corporation. All Rights Reserved.

Send Feedback