Call to JavaScript function from c# is failing...why?

  • Thread starter Thread starter chance
  • Start date Start date
C

chance

My c# code:

string path =
Path.Combine(Path.GetDirectoryName(this.GetType().Assembly.Location),
"VirtualEarth.htm");
webBrowser1.Navigate(path);

webBrowser1.Document.InvokeScript("doSomething");

Javascript code:
function doSomething()
{
MsgBox("Hello");

}

Nothing happens. Can someone explain why that might be?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top