Web Controls

Web Controls were designed for use with the Mathcad Application Server but can also be used in any Mathcad worksheet. They are similar to Mathsoft Controls.

Web Controls have two benefits in setup and use:

Web Controls can be set to either text or numerical values. Text values are passed as string variables.

The following Web Controls are available in Mathcad:

Application Server

When a Mathcad worksheet is opened in a Web browser from a site equipped with the Application Server, the Web Controls become HTML Forms controls. The user can change their values and recalculate the worksheet on the Application Server. Only values defined through a Web Control can be changed within a Web browser before being passed to the Application Server.

Note:

Text Box Properties

The following options are available on the Text Box Properties tab:

Text box width (characters)

The total length of the text string visible in the text box at any given time. You can use either the arrow keys or the mouse to move back and forth within the string. The minimum width is 1, and the maximum is 255.

Maximum text length

The total length of the text string that can be entered into the text box. The minimum allowable length is 1, and the maximum is 255.

Check Box Properties

The following options are available on the Check Box Properties tab:

Label

The descriptive text displayed next to the check box in the worksheet. Changing a check box's label does not change its value; check boxes only return either 0 or 1.

Recalculate Web page when control value changes

Forces a recalculation of your worksheet when you either select or deselect the check box. This option is only effective when the worksheet is opened in a browser and calculated by the Mathcad Application Server.

Note: If you have more than one input control in your worksheet, you may want to disable recalculation on the individual controls and rely on a Submit button instead, as this speeds up editing of the worksheet.

List Box/Combo Box Properties

The following options are available on the List/Combo Box Properties tab:

Display height (rows)

Controls how many choices (one per row) are visible at any given time. This setting also affects how the control displays in your worksheet.

If the display height is set to 1, this control is shown as a standard combo box. For settings greater than 1, but less than the number of entries in the Item list, the control displays as a scrolling list box. If the display height is greater than or equal to the number of entries in the Item list, the control appears in the worksheet as a list box, with empty, unselectable lines following the list.

Values equal names

When this selection is enabled, the list entries are passed to the variable "as is." When this selection is disabled, the list entries are mapped to values, which are, in turn, passed to the variable defined by the control.

Item list

The choices available when the control is viewed in the worksheet. If you have disabled the "Values equal names" setting, this list consists of two columns: one for the Name, which is displayed in the control, and the other for the associated Value, which is passed to the worksheet. If "Values equal names" is enabled, this list consists of only one column, for the Name, which is also passed to the worksheet.

Below the list are three buttons for adding items to or deleting them from the list:

Add Item – Adds a line to the end of the list, and populates both the Name and Value fields with the text "[New Item]."

Delete Item – Removes the selected line from the list.

Reset – Deletes the entire list.

Note: When editing an entry in the list, you must click out of a field before clicking "OK" to accept your changes. If you do not click out of a field before clicking "OK," the changes you make to that field are discarded.

Recalculate web page when control value changes

Forces a recalculation of your worksheet when you change your selection. This option is only effective when the worksheet is opened in a browser and calculated by the Mathcad Application Server.

Note: If you have more than one input control in your worksheet, you may want to disable recalculation on the individual controls and rely on a Submit button instead, as this speeds up editing of the worksheet.

Radio Button Group Properties

The following options are available on the Radio Button Group Properties tab:

Values equal names

When this selection is enabled, the list entries are passed to the variable "as is." When this selection is disabled, the list entries are mapped to values, which are, in turn, passed to the variable defined by the control.

Item list

The choices available when the control is viewed in the worksheet. If you have disabled the "Values equal names" setting, this list consists of two columns: one for the Name, which is displayed in the control, and the other for the associated Value, which is passed to the worksheet. If "Values equal names" is enabled, this list consists of only one column, for the Name, which is also passed to the worksheet.

Below the list are three buttons for adding items to or deleting them from the list:

Add Item – Adds a line to the end of the list, and populates both the Name and Value fields with the text "[New Item]."

Delete Item – Removes the selected line from the list.

Reset – Deletes the entire list.

Note: When editing an entry in the list, you must click out of a field before clicking "OK" to accept your changes. If you do not click out of a field before clicking "OK," the changes you make to that field will be discarded.

Recalculate web page when control value changes

Forces a recalculation of your worksheet when you change your selection. This option is only effective when the worksheet is opened in a browser and calculated by the Mathcad Application Server.

Note: If you have more than one input control in your worksheet, you may want to disable recalculation on the individual controls and rely on a Submit button instead, as this will speed up editing of the worksheet.

Submit Button Properties

Submit buttons are used when your worksheet is calculated by the Mathcad Application Server, to force a recalculation of the worksheet. Although you can force your worksheet to recalculate when changing the value of a control, it is less time-consuming to use a Submit button when you have more than one input control in your worksheet.

The only option available on the Submit Button Properties tab is:

Label

This is the description of the button, displayed on the button itself. The default value is "Recalculate." Changing this value affects only the display of the button, and not the functionality.