ZennoLab Assemblies Documentation
EvaluateScript Method
Example 

Type: System.String

A string expression with javascript.

Executes a java script that is implemented by the currently loaded document.
Executes a java script that is implemented by the currently loaded document.
Syntax
public string EvaluateScript( 
   string script
)

Parameters

script

Type: System.String

A string expression with javascript.

Return Value

Type: System.String

The result of the script execution.

Example
The following code example demonstrates uses of the EvaluateScript method.
public static int Execute(Instance instance)
{
    Tab tab = instance.MainTab;
    if ((tab.IsVoid) || (tab.IsNull)) return -1;
    if (tab.IsBusy) tab.WaitDownloading();
    return tab.MainDocument.EvaluateScript("document.write(1)");
}
public static function Execute($instance)
{
    $tab = $instance->MainTab;
    if (($tab->IsVoid) || ($tab->IsNull)) return -1;
    if ($tab.IsBusy) $tab->WaitDownloading();
    return $tab->MainDocument->EvaluateScript("document.write(1)");
}
Requirements

Target Platforms: Desktop: Windows XP SP3 and older. Server: Windows Server 2003 and older.

See Also

Reference

Document Class
Document Members

Send Feedback