Solved

WebBrowser: Intercept Javascript Alert

Posted on 2006-07-11
2
1,910 Views
Last Modified: 2010-05-18
I have a webbrowser control in a vb.Net 2005 application. When I navigate to a site that gives me a javascript alert, I want to intercept it and display it differently in the application. Can anyone tell me how to do this? Thanks.
0
Comment
Question by:rbichon
  • 2
2 Comments
 
LVL 10

Accepted Solution

by:
prakash_prk earned 500 total points
ID: 17081343
thats possible.

You need to implement IDocHostShowUI and capture the Javascript alert and
confirm message boxes in the ShowMessage method

try the link.

http://groups.google.co.in/group/microsoft.public.inetsdk.programming.webbrowser_ctl/browse_frm/thread/c2fa459bc697e864/eaebf644369c2942?lnk=st&q=IDocHostShowUI+%2B+C%23&rnum=2&hl=en#eaebf644369c2942

regards
prakash
0
 
LVL 10

Expert Comment

by:prakash_prk
ID: 17096926
thanks  rbichon
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now