ZennoLab Assemblies Documentation
EvaluateScript Method
See Also  Example Send Feedback
ZennoLab.CommandCenter Assembly > ZennoLab.CommandCenter Namespace > Document Class : EvaluateScript Method
script

Type: System.String

A string expression with javascript.

Glossary Item Box

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

C# 
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.
C#Copy Code
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)");
}
PHPCopy Code
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: Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2014 All Rights Reserved.