473,395 Members | 1,941 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

axWebbrowser - HTMLWindowEvents catch and control -HOWTO?

Hello. I need a little help to get this thing finished. Im trying to catch
js errors and the event works as expected. However I have created an event
from doc.parentWindow but when it fires im unable to suppress it using a
returnValue = true.

Im navigating to an URI using axWebBrowser1.Navigate(txtURI.Text, ref
nullObject, ref nullObjStr, ref nullObjStr, ref nullObjStr);

My code:
mshtml.CEventObj CEobj;
mshtml.HTMLWindowEvents2_Event iEvent2;
private void NavigateComplete(object sender,
AxSHDocVw.DWebBrowserEvents2_NavigateComplete2Even t e)

{
mshtml.HTMLDocument doc;
doc = (mshtml.HTMLDocument)axWebBrowser1.Document;
iEvent2 = (mshtml.HTMLWindowEvents2_Event) doc.parentWindow;
iEvent2.onerror += new
mshtml.HTMLWindowEvents2_onerrorEventHandler(iEven t2_onerror);
}

When this iEvent2 fires:

private void iEvent2_onerror(string description, string url, int line)
{
label1.Text = "Err";
CEobj = (mshtml.CEventObj)iEvent2 ;
CEobj.returnValue = true;
}

As you can see im trying to set the returnValue = true but it stills opens a
new window telling me that there's an error onm the page. How do I suppress
that?

I've read that returnValue = true should do it here:
http://support.microsoft.com/?kbid=279535

Kind regards

Nov 16 '05 #1
0 1955

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

Similar topics

0
by: David Elliott | last post by:
I have created an application that loads assemblies (plugins). These plugins are windows forms that have an embedded browser. private AxSHDocVw.AxWebBrowser browser; If I comment out...
0
by: Lecture Snoddddgrass | last post by:
Hi, I noticed that my WinForms app was taking a while to start up. I stepped through the code to find out which line was causing the delay. The delay is occurring within one of my UserControls...
4
by: TF | last post by:
hi, i am using AxWebBrowser control in my C# dot.net windows application. i want to display a web page in the browser that needs some data sent to it through HTML Form 'POST' method. I saw a...
0
by: beau | last post by:
Hi, I'm using the AxWebBrowser in a C# WinForms application. I've got the basics working, but need some help controlling the view options for browsing files. How can I disable the...
0
by: Per Agerbęk | last post by:
an application, that automates using a website. An upcomming change, is the introduction of a java webstart file (.jnlp). The user press this link <a id="dgBoeger__ctl4_Linkbutton1"...
3
by: Clint MacDonald | last post by:
I have used the AxWebBrowser in a Visual Basic Project... I found that both Framework 1.0 and 1.1 had to be installed for it to work properly. I now have found that in Studio 2003, that the...
1
by: MPR | last post by:
I'm displaying a web page with the navigate2 method of the axWebBrowser control. On the web page that is already in the axWebBrowser control, there are severla links, like in any other web page....
0
by: sagar.jawale | last post by:
Hi, In my c# windows application, i am using AxSHDocVw.AxWebBrowser. I am displaying a generated receipt html in this browser. Also, for printing the same html, i am using the following command...
6
by: Dave Booker | last post by:
It appears that I cannot correctly install the AxWebBrowser in VS2005. I can instantiate an "AxWebBrowser browser" and refer to its members, properties, and methods. I'm having trouble with the...
0
by: tamarindm | last post by:
Hi, I have a csharp application, running multiple instances of AxWebBrowser at the same time. Each web browser requires the same cookie, set using InternetSetCookie. If one AxWebBrowser control...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.