guides:o4w:o4w_api:o4wtextoptions

O4WTextOptions routine

O4WTextOption can be applied to any O4WText, and indicates which input control this text is associated with, and whether this text should be treated as a paragraph; this information is used by the browser to help control layout or to provide additional "accessibility" support.

O4WTextOptions( labelForID, labelForType, paragraphClass )

The function has the following parameters:

ParameterDescription
labelForIdThe ID of the input control.
labelForTypeThe type of the input control. Valid values are: "textbox", "radiobutton", "checkbox", or "listbox". The default is "textbox".
paragraphClassA flag that tells O4WText to display the text wrapped in "paragraph" (<p>) html tags (as opposed to its normal behavior of wrapping text in "span" (<span>) tags). Set this to "1" to have O4WText generate "<p>" instead of "<span>" output. ParagraphClass can also be set to the name of a class you wish to assign to your paragraph; if a non-null, non-"1" value is specified, O4WText will generate a "<p>" tag with the specified class, in addition to a span (which will be nested inside the "<p>" tag).

O4WText routine

O4WText("Customer Name: ", O4WTextOptions("CNAME", "TEXTBOX"))

O4WTextBox("", "", ", "CNAME", "CNAME")

O4WText("Now is the time for all good men to come to the aid of their country", "", O4WTextOptions("", "", "main"))

* This will treat this text as a paragraph, with the style class "main" applied to the generated html
 
 
 
 
  • guides/o4w/o4w_api/o4wtextoptions.txt
  • Last modified: 2024/06/19 20:19
  • by 127.0.0.1