| Overview Of: mu | Top | Context Index | Next Function |
|
syntax: mu object. Form element rendering author: Tim Johnson tim@akwebsoft.com Initialization: mu/load with refinements and options see doc for load Handles: DOM and pseudo-datatypes. See the descriptor object. Adding: new pseudo-datatype: 1: Add to java-script context Also to java-script-valid if a user-defined type 2: Add to descriptor/sub-types along with corresponding real type, if necessary 3: Add to type switch in function _render 4: Add context to descriptor, if subtype, see uint example Initialization: block - nested blocks for each form element example: Of a layout block ogin-data: [ "Login" [type "text" txt[llabel "User: " req 1] atr[size 40 maxlength 90]] "Password" [type "password" txt[llabel "Password: " req 1] atr[size 40 ]] "Submit" [type "submit" txt[llabel ""] atr[value "Go"]] "Reset" [type "reset" txt[llabel ""] atr[value "Clear"]] ] sublayouts:: type: DOM -compliant type or pseudto-type atr: Dom- compliant attributes and values txt: control attributes and values llabel: Text displayed to left of widget rlabel: Text displayed to right of widget slabels: List of labels to be displayed to left of radio buttons mlabel: Main label for radio buttons. Comes first. NOTE: llabel, rlabel, mlabel may be strings or blocks of two strings. If block: First string is used for error, handling, reviewing, etc. Second string concatenated for primary data entry. req: Is a selection or data entry required? obj: Return object reqif: Conditional requirement. Evaluation of code block. val: Used to signal use of values option in a select list. NOTE!!: Not to be confused with the val attribute of al-class data: data block for select list. Not to be confused with the data attr key for textarea types src: To be implemented: value would be [mysql-table value-column key-column] rj: used with label on left (llabel or slabel) to justify label. If integer, number of non-breaking space entities to use, if string, use literal value lj: Used with label on right (rlabel) to justify label. If integer, number of non-breaking space entities to use, if string, use literal value dsc: Description, use instead of label when reporting errors IMPORTANT!: If problems look in the implementation of the al-class -AL!- and blk-class -BLK!- classes. |
| Function: mu/analyze-usage | Top | Context Index | Previous Function | Next Function |
|
syntax: mu/analyze-usage Help for the analyze method. |
| Function: mu/choice-only | Top | Context Index | Previous Function | Next Function |
|
syntax: mu/choice-only <str-word-name> description: Truncates a select element so only the selected option item remains. |
| Function: mu/Control_Variables | Top | Context Index | Previous Function | Next Function |
|
syntax: Control_Variables js-srcs: block of javascript files used for validation and dates. image-dir: Name of images directory form-name: Name of form to be rendered error-font: Default is red advice-font: Default is green delim: Delimiter for multiple values in a string. Default is "|" auto-js: Automatically load validation javascripts Fonts: font-size, font-color, font-class, font-face, font-all - all default to empty auto-bold: Set to true for all labels to be bold button-class: css class for buttons. Default is "Buttons" checkbox-class: css class for checkboxes Default is empty or none input-class: css class for input elements. Default is "text" input-style: Inline style descriptor for input fields submit-style: Inline style descriptor for submit buttons reset-style: Inline style descriptor for reset buttons textarea-style: Inline style descriptor for text areas readonly-style: Inline style descriptor for readonly fields. select-style: Inline style descriptor for select elements. selection-required: Default text for top line of select option list = "Selection Required" list-divider: Dashed line beneath selection-required text. |
| Function: mu/dual-option-list | Top | Context Index | Previous Function | Next Function |
|
syntax: mu/dual-option-list <option-block> <any-choice> description: Create option list with both text and option values args: lst is two-dimensional (nested) block of names and values |
| Function: mu/dump | Top | Context Index | Previous Function | Next Function |
|
syntax: mu/dump <args-block> display the loaded data by keys in <args-block>. Note: If args is empty, display all. |
| Function: mu/flush | Top | Context Index | Previous Function | Next Function |
|
syntax: mu/flush Clears data so object can reused. |
| Function: mu/get | Top | Context Index | Previous Function | Next Function |
|
syntax: mu/get Retrieve info on loaded layout. refinement: first-order /TYPE..Return type of name refinement: first-order /TEXT..Return any of llabel, rlabel, slabels, mlabel, label, req, reqif, val, obj, src attributes when used as secondary refinement. If no secondary refinements, return the txt object. refinements: /ATTRIBUTES: Return any of secondary refinements /OBJ......Return atr /object /DATA.....List of data for select and radio types /CHOICE...Item value chosen for select and radio types refinements: /HOWTO..Get help message |
| Function: mu/get-data | Top | Context Index | Previous Function | Next Function |
|
syntax: mu/get-data <word-str-key> return the data attribute for key |
| Function: mu/get-usage | Top | Context Index | Previous Function | Next Function |
|
syntax: mu/get-usage Help for the get method. |
| Function: mu/hide | Top | Context Index | Previous Function | Next Function |
|
syntax: mu/hide <str-word-name> render a hidden input field |
| Function: mu/inline-style | Top | Context Index | Previous Function | Next Function |
|
syntax: mu/inline-style <block-args> From args, compose an inline style. args: alternating keywords and values. keywords checked for validity. |
| Function: mu/keys | Top | Context Index | Previous Function | Next Function |
|
syntax: mu/keys Return all keys |
| Function: mu/lable | Top | Context Index | Previous Function | Next Function |
|
syntax: mu/lable <word-str-key> Render label, but do not pop refinement: /font fontify the label. |
| Function: mu/load | Top | Context Index | Previous Function | Next Function |
|
syntax: mu/load <layout-block> Load the layout block refinement: /web - load with the cgi data member as the record refinement: /mysql <rec> - load with <rec> as block of alternating column names and values. refinement: /create create layout from DB descriptor block refinement: /nolabels Ignore labels |
| Function: mu/make-script | Top | Context Index | Previous Function | Next Function |
|
syntax: mu/make-script <str-blk-logic> Writes out validating javascript arg: if string or block - javascript source passed. arg: if logic - use js-srcs block of javascript sources description: - script-body was composed during load. It is now written out. refinement: /width <str-block> - addition text added. refinement: /provide Return string, do not print |
| Function: mu/menu | Top | Context Index | Previous Function | Next Function |
|
syntax: mu/menu <block-lst> Create unordered list type from lst refinement: /type <type> Set the type. |
| Function: mu/mu | Top | Context Index | Previous Function | Next Function |
|
syntax: mu/instyle/set <block-of-args> description: Compose and maintain inline style, onMouseOver, and onMouseOut attributes. Note: The mu object stores the output as a value inStyle is a context and uses set to do its work. args: Alternating words and values. Acceptable words follow. bg.....background color (AND onmouseout) bgh....background color when mouseovered fg.....text color (AND onmouseout) fs.....font size. <integer> fw.....font weight |
| Function: mu/names | Top | Context Index | Previous Function | Next Function |
|
syntax: mu/names Return the loaded names. |
| Function: mu/pop-label | Top | Context Index | Previous Function | Next Function |
|
syntax: mu/pop-label <str-word-key> label for key is rendered and popped. |
| Function: mu/pull | Top | Context Index | Previous Function | Next Function |
|
syntax: mu/pull <str-key-name> Pull by name from names and keys |
| Function: mu/put | Top | Context Index | Previous Function | Next Function |
|
syntax: mu/put <str-word-name> <any-val> Set storage value as val for name |
| Function: mu/rec | Top | Context Index | Previous Function | Next Function |
|
syntax: mu/rec <args-block> dump out stored data by args member Note: Words are expected |
| Function: mu/render | Top | Context Index | Previous Function | Next Function |
|
syntax: mu/render <str-word-block-key> Render the widget by key. NOTE:: The label may have already been written, and if so, was popped. If key is a block, multiple renderings. |
| Function: mu/reset | Top | Context Index | Previous Function | Next Function |
|
syntax: mu/reset Clear all of the set values. I.E. by storage-key |
| Function: mu/set-font | Top | Context Index | Previous Function | Next Function |
|
syntax: mu/set-font <attrs-block> Set font for labels. keywords: size, face, color, class, bold |
| Function: mu/set-input | Top | Context Index | Previous Function | Next Function |
|
syntax: mu/set-input <str-block> descriptor: Set inline style rules for input elements with either a string or a block |
| Function: mu/set-reset | Top | Context Index | Previous Function | Next Function |
|
syntax: mu/set-reset <str-block> descriptor: Set inline style rules for reset buttons with either a string or a block |
| Function: mu/set-select | Top | Context Index | Previous Function | Next Function |
|
syntax: mu/set-select <str-block> descriptor: Set inline style rules for select element with either a string or a block |
| Function: mu/set-submit | Top | Context Index | Previous Function | Next Function |
|
syntax: mu/set-submit <str-block> descriptor: Set inline style rules for submit buttons with either a string or a block |
| Function: mu/set-textarea | Top | Context Index | Previous Function | Next Function |
|
syntax: mu/set-textarea <str-block> descriptor: Set inline style rules for textareas with either a string or a block |
| Function: mu/set-value | Top | Context Index | Previous Function | Next Function |
|
syntax: mu/set-value <str-word-key> <any-val> Set a stored value in the layout block. |
| Function: mu/set-values | Top | Context Index | Previous Function | Next Function |
|
syntax: mu/set-values <keyvals-block> Set multiple values for keys |
| Function: mu/setv | Top | Context Index | Previous Function | Next Function |
|
syntax: mu/setv <args-block> Set a layout attribute by name sublayout, key and value example: mu/setv ["name" [atr[size 40]]] description: name/block pairs for atr&txt, name/value pairs for type |
| Function: mu/type | Top | Context Index | Previous Function | Next Function |
|
syntax: mu/type <word-str-key> get type for <key> |
| Function: mu/usage | Top | Context Index | Previous Function | Next Function |
|
syntax: mu/usage Help for the the mu context Note: HIGHLY recommended. Might be out-of-date |
| Function: mu/validate | Top | Context Index | Previous Function | Next Function |
|
syntax: mu/validate Validate/test loaded data. |
| Function: mu/value | Top | Context Index | Previous Function | Next Function |
|
syntax: mu/value <word-str-key> Return stored value for key. Note: Not necessarily the value attribute for the element. |
| Function: mu/verify | Top | Context Index | Previous Function |
|
syntax: mu/verify Validate loaded data on the server side. Best usage: debugging. |