javascript evaluation in Microsoft.jScript.Eval.JScriptEvaluate
<pre><code>var x = "var dom = null;

try {
    dom = new ActiveXObject('Microsoft.XMLDOM');
    if (!dom.loadXML(xml)) // parse error ..
        window.alert(dom.parseError.reason + dom.parseError.srcText);
} catch (e) { dom = null; ";

try {
    var str = Microsoft.JScript.Eval.JScriptEvaluate(x,Microsoft.JScript.Vsa.VsaEngine.CreateEngine());
     MessageBox.Show(str.ToString());
} catch (Exception ex) {
    MessageBox.Show(ex.Message + "\n" + ex.StackTrace);
}
</code></pre>

<p>This following error gives me the error which is given below variable 'window' has not been declared.</p>

<p>This project is the windowsform application which is developed into C#.net.</p>

<p>How do I fix this error?</p>
