ejEvalGoAhead JavaScript APIGoAhead EMF

Synopsis

Set the value of a JavaScript variable

Prototype

#include "ej.h"

int ejEval(int eid, char_t *script, char_t **errorMessage);

Parameters

eid JavaScript interpreter handle
script JavaScript to evaluate
errorMessage Error message

Description

The ejEval procedure evaluates a JavaScript script. If the script fails,  a text message describing the error is returned in errorMessage. This message is dynamically allocated and must be freed using bfree.

Return Value

Returns 0 if successful. Returns -1 on errors.

Example

char_t *emsg;
   
ejEval(eid, "write('Hello World');", &emsg);

See Also

JavaScriptActive Server PagesejOpenejGetVar