HtmlETable

Takes 6 parameters, Location, Mode, Div, Data, Script, Extra

Description:
"Excel-like" editing in a data grid, HtmlETable is short for "HTML Edit Table"

This uses https://handsontable.com

Moxie ships with and old open source free version integrated and available. Significant breaking changes and a change in their license model prevents upgrades to this, so use of this should be for lightweight and ad hoc tasks only. More advanced requirements and production solutions should license and manually integrate a newer version or use another control.

When using this control on a page, it will change the line spacing for all tables on the page. This combined with other conflicts means that this control should typically be the only table on the page.

 

Syntax:
Location, Mode, Div, Data, Script, Extra
Location, Mode, Div, Data, Script, [""]
Location, Mode, [""], Data, Script, [""]
Location, Mode, [""], [""], Script, [""]
Location, Mode, [""], [""], [""], [""]
Location, ["Append"], [""], [""], [""], [""]
["Runtime"], ["Append"], [""], [""], [""], [""]

Location
If blank, defaults to "Runtime", may be any Template Insertion Point

Mode
If blank, defaults to "Append". Other valid values are Prepend and Replace

Div
May be blank for a default

block to be created with a unique ID assigned. Populate this parameter to provide your own HTML for the
block, but be sure that you have a unique ID set on the first
that will be used by the ETable.

Data
May be blank for the default JsonStream of the Work Query with only the option of Header specified. May also be a set of your own JsonStream options, or your own JSON data. Use the ETableStream command to parse any JSON data returned by ETData.

Script
May be blank for the default simple ETable, which unless otherwise interfaced with will not save changes anywhere. A set of Script Options outlined below can be used for quick common configurations, or provide own JavaScript that will be placed inside of a [script][/script] block.

Extra
May be blank for no effect, or may contain JavaScript that will be placed at the very end of the [script][/script] block. This is useful when you want to extend the code generated by using simple Script Options.

Script Options

Items listed as required are only required if that feature set of options is to be used. See example for usage framework. Noted that the JSON Object names of ETData and ETResult are fixed and must be used as shown in the example.

  • LoadURL='Path' (required)
  • LoadID='ButtonID' (required)
  • LoadStatus='SpanID' (optional, default to no status update)

  • SaveURL='Path' (required) See ETableReply
  • SaveID='ButtonID' (required)
  • SaveStatus='SpanID' (optional, default to no status update)

  • AutoSaveURL='Path' (required. Sends changes only)
  • AutoSaveID='CheckboxID' (optional, defaults to no checkbox needed)
  • AutoSaveTime='ms' (optional, defaults to 1000. This is the status update timer only, changes are always sent immediately)
  • AutoSaveStatus='SpanID' (optional, defaults to no status update)
  • AutoSavePending='Pending Text' (optional, defaults to 'Changes will be Auto Saved')

  • ColWidths='SingleValOrArray' (This turns off autoRowSize and autoColumnSize)

  • Extra='Other Options' (This text will be added to the end of the init options string)

  • Script='JavaScript' (This text will be used as the complete script, and may not be mixed with other options)