Form using two Web Browser Controls 
Author Message
 Form using two Web Browser Controls

How can I click a link in one browser and have it target the other browser
in the form?

Thanks



Sun, 12 Dec 2004 01:15:11 GMT  
 Form using two Web Browser Controls
Jonathan,

    You will have to detect the click event on the control first.  Once you
do that, you will have to figure out what was clicked on (you might be able
to use some of the methods on the IHTMLWindow or IHTMLDocument interfaces to
translate a point into an element.  Once you find that element, and you know
it is an <A> tag, you will have to then determine the link and then call the
Navigate method on the other web browser control.

    However, you will need to be careful when you have javascript calls, for
example, since it might be referencing function that are not defined in the
document in the other window.

    Hope this helps.

--
               - Nicholas Paldino [.NET MVP]


Quote:
> How can I click a link in one browser and have it target the other browser
> in the form?

> Thanks



Sun, 12 Dec 2004 01:34:21 GMT  
 Form using two Web Browser Controls
I think you could catch the BeforeNavigate event on the first WebBrowser and
see where it is trying to go. Then you can cancel that navigation. Then call
the Navigate method on the other WebBrowser.


Quote:
> How can I click a link in one browser and have it target the other browser
> in the form?

> Thanks



Sun, 12 Dec 2004 06:39:14 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. capture PDF form data using web browser control

2. capture PDF form data using web browser control

3. simulating Submit from an HTML form using Web Browser control in Visual Basic

4. Two questions about the Web Browser Control

5. Adding a web browser control to a form/dialog

6. Web Browser Control to post to, save results from search form

7. adding a web browser control to a form

8. Web Browser Control using java

9. Executing VBScript in a HTML page using web browser control

10. reference to an embeded application object using web browser control

11. Help using web browser control

12. Using Web Browser control

 

 
Powered by phpBB® Forum Software