Solved

WebBrowser: Intercept Javascript Alert

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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 video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

830 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