title: C# WebBrowser Run Javascript - Return blank page with the result of the Javascript - Why?
body: <p>when i try to run javascript in a webbrowser, the code runs, but after it has been executed takes me on a white page with the upper right corner a numeric value (in this case "1000"), taking me away from the site where I was previously</p>
  
  <pre><code>HtmlElement head = webBrowser1.Document.GetElementsByTagName("head")[0];
  HtmlElement scriptEl = webBrowser1.Document.CreateElement("script");
  IHTMLScriptElement element = (IHTMLScriptElement)scriptEl.DomElement;
  element.text = "function ScrollDown() { document.getElementsByClassName('scrollableitemclass').scrollTop = 1000 }";
  head.AppendChild(scriptEl);
  webBrowser1.Document.InvokeScript("ScrollDown");
  </code></pre>
  
  <p>Thank you for the help</p>