ObjectDCL Banner

Html_ReplaceText Method

Description

This method will update a portion of the Html document currently loaded, by replacing specified text with new text. This method is useful for retrieving input values of form controls in the Html document.

Parameters

MyControlReference
Reference to the control in the form of MyProject_MyForm_MyControl.
ProjectFile
String identifying the project as it was passed in LoadProject.
DialogName
String identifying the dialog by name.
ControlName
String identifying the control by name.
OldHtmlCode
String identifying the code snippet to look for.
NewHtmlCode
String identifying the code snippet to use as a replacement.

Return Values

Returns the following according to the situation:

  • T when successful.
  • Nil if the control is not found.

AutoLISP Syntax

The recommended convention is passing the control identifier directly:

CopyCode imageCopy Code
(Odcl_Html_ReplaceText 
		MyControlReference [as Reference]
		OldHtmlCode [as String]
		NewHtmlCode [as String])

An alternative convention is to identify the control by providing the project file, the dialog name and the control name:

CopyCode imageCopy Code
(Odcl_Html_ReplaceText
		ProjectFile [as String]
		DialogName [as String]
		ControlName [as String]
		OldHtmlCode [as String]
		NewHtmlCode [as String])

Applies For

HtmlControl.

Example

CopyCode imageCopy Code
; Replace this snippet
(Odcl_Html_ReplaceText MyProject_MyForm_MyControl "<b>Chance</b>" "<b>luck</b>")

See Also

Html_UpdateHtmlCode