Solved

WebBrowser: Intercept Javascript Alert

Posted on 2006-07-11
2
1,913 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
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…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

911 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

21 Experts available now in Live!

Get 1:1 Help Now