|
|
|
|
|
HTMLEditorExecuteJS (Function) In french: EditeurHTMLExécuteJS Executes JavaScript code in an HTML Editor control.
HTMLEditorExecuteJS(EDHTML_MonEditeurHTML, "document.body.images.length", ...
EditeurHTMLExécuteJS_Callback)
INTERNAL PROCEDURE EditeurHTMLExécuteJS_Callback(OK is boolean, LeRésultat is string)
dbgAssert(OK)
Info("Il y a " + LeRésultat + " images dans le document.")
END
Syntax
HTMLEditorExecuteJS(<HTML Editor control> , <JavaScript code> [, <WLanguage procedure>])
<HTML Editor control>: Control name Name of the HTML Editor control used. <JavaScript code>: Character string JavaScript code to execute. <WLanguage procedure>: Optional procedure name WLanguage procedure ("callback") used to find out the result of code execution. This procedure has the following format:
PROCEDURE <Procedure name>(bSuccess is boolean, ReturnValue is string) This procedure is called once the JavaScript code has been executed. The parameters of this procedure are: - <bSuccess>:
- True if the JavaScript code was successfully executed,
- False if the execution of JavaScript code generated an error (e.g., error in the JavaScript code). In that case, to get more details on the error, use ErrorInfo.
Note: The error returned is generic.
- <ReturnValue> contains the value of the last expression of the JavaScript code (returned value).
Remarks Javascript code is executed in the context of the document being edited: "document" represents the document being edited.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|