473,574 Members | 2,918 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Windows.Forms.W ebBrowser 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.W ebBrowser and get the results ?

Dec 15 '05 #1
2 12901

da***********@g mail.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.W ebBrowser 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.htmldocum ent.aspx>
and has a method named InvokeScript
<http://msdn2.microsoft .com/en-us/library/c143s1sy(en-US,VS.80).aspx>


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

Dec 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: ljlevend2 | last post by:
I would like to implement common edit operations (i.e., Cut, Copy, Paste, Select All and Find) in a System.Windows.Forms.WebBrowser. Are there any methods or tools for doing so? Thanks, Lance
by: daniel.manges | last post by:
I need to use a Windows.Forms.WebBrowser in a separate thread. (I'm not using the GUI, I just want to navigate to a page and get the ..Document.Body.InnerText property of the WebBrowser - maybe there is another way to do this?). To make the instance, I set the thread to run in STA mode. However, the DocumentCompleted event never gets...
by: Eggy | last post by:
Hi. I have an application that should download files from internet. The problem is the protocol is HTTPS. So I have a System.Windows.Forms.WebBrowser which allows the user to log in to the HTTPS webpage with username and password. The login is working since I can look at the files (XML-files) by navigating to them(see the XML in them), which...
by: Qiang | last post by:
Hi, Anybody knows how to convert an instance of SHDocVw.WebBrowser to System.Windows.Forms.WebBrowser? Or is it possible? thanks, Qiang
by: Spam Catcher | last post by:
Is there a way for Javascript within a WebBrowser Control to access the parent .NET application? I was using another IE control and it had this ability. Anyone know how to do this in the .NET 2.0 browser? Thansk!
by: Joe | last post by:
HI Trying to figure out the difference between these 2 browser I am embedding a MS office Document (Word/Excel) in a WebBrowser on a Form With AxSHDocVw I can do the following to save the current document object o = new object(); axWebBrowser1.ExecWB(SHDocVw.OLECMDID.OLECMDID_SAVE,SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_DONTPROMPTUSER, ref...
by: sonicwrx | last post by:
Am I missing something? I have a form with a browser control and a button. The code under the button is: private void btnGo_Click(object sender, EventArgs e) { wbScrape.Navigate(@"http:// www.google.com"); }
by: =?Utf-8?B?Q29kZVJhem9y?= | last post by:
I am converting a windows application which contains a web browser control into an ASP.net application. The Windows project references all manner of html controls in the WebBrowser control and retrieves values using the HtmlControlCollection class etc. I was hoping I was going to be able to work with the Windows.Forms.WebBrowser object...
by: mici8 | last post by:
I am trying to use WebBrowser WebBrowser1 = new System.Windows.Forms.WebBrowser(); in a class library. I have a vb.net code in an application and i need to change to c# class Library. I have this method: Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.