471,354 Members | 1,411 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,354 software developers and data experts.

Windows.Forms.WebBrowser Javascript

I'm working on a .NET application using Google Maps, but since the page
is updated with Javascript, I think I need to use Javascript to get
directions from the page. Does anybody know how to invoke javascript
commands on a Windows.Forms.WebBrowser and get the results ?

Dec 15 '05 #1
2 12787


da***********@gmail.com wrote:
I'm working on a .NET application using Google Maps, but since the page
is updated with Javascript, I think I need to use Javascript to get
directions from the page. Does anybody know how to invoke javascript
commands on a Windows.Forms.WebBrowser and get the results ?


A WebBrowser instance has a property named Document
<http://msdn2.microsoft.com/en-us/library/6s982aac(en-US,VS.80).aspx>
which is an instance of HtmlDocument
<http://msdn2.microsoft.com/en-us/library/system.windows.forms.htmldocument.aspx>
and has a method named InvokeScript
<http://msdn2.microsoft.com/en-us/library/c143s1sy(en-US,VS.80).aspx>

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Dec 15 '05 #2
Ah! Thank you! I didn't notice the method under the Document element.

Dec 15 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by daniel.manges | last post: by
1 post views Thread by Spam Catcher | last post: by
3 posts views Thread by sonicwrx | last post: by
reply views Thread by =?Utf-8?B?Q29kZVJhem9y?= | last post: by
reply views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.