473,837 Members | 1,413 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

AxWebBrowser disable javascript / all scripting

Hi all,
I would like to know if there are anyways to disable javascript, activeX
and all scripting on AxWebBrowser.
I have a program that include the AxWebBrowser and load internet pages, but
some pages keep having javascript error and a popup was shown.
I want to eliminate all the popup from javascript and other object, how can
I achieve this?

Thanks a lot.
Nov 21 '05 #1
2 6413

The axwebbrowser reuse Internet Explorer (shdocvw) as it is installed on the
client computer.

Therefore it is not possible to set other settings in that, than as is in
that IE.

Practical it is of course possible to reset registry settings. I advice you
never to do this kind of things.

By changing registry settings that are not part of your program, you can be
held direct responsible for any damage that can happen because the fact that
you have changed registry settings without the knowledge of the user.

This even when your program set it back in original state. If the user use
than the program while your program is active, or your program crashes, than
the problem will be the same.

However just my thought,

Nov 21 '05 #2

Hello Windy

You can bypass the behavior of the webbrowser control without influencing
the normall behavior of internet explorer

in VB6 this was done with the wbcustomizer.dl l that was made availlable by
ms and written in C++ however as i never liked externall dependancies in my
projects i achieved the same thing with subclassing the webbrowser control
,,,,, as VB.Net was ariving i had to find a simular way to , dissable /
bypass the normall explorer behavior i asked a lot and heard from a lot of
people that it was not possible
so i invented the wheel but made it publicly availlable

my example is made to prevent ctr + p ( print the screen ) , right mouse
click ( to see the source of the html page ) , Backspace ( for history -1
behvior ) etc etc etc
it can easily extended to annything you need ,, ( just capture the
messages and add them to the select case )

you can download the code here



Michel Posseth [MCP]
<Windy> wrote in message news:%2******** ********@TK2MSF TNGP15.phx.gbl. ..
Hi all,
I would like to know if there are anyways to disable javascript, activeX
and all scripting on AxWebBrowser.
I have a program that include the AxWebBrowser and load internet pages,
but some pages keep having javascript error and a popup was shown.
I want to eliminate all the popup from javascript and other object, how
can I achieve this?

Thanks a lot.

Nov 21 '05 #3

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

Similar topics

by: Ben | last post by:
I've got an asp page that populates a listbox with info from a db. The list box ends up being pretty big, so I want to be able to search it effectively. I like the method wherein the user types the letters of the word they are looking for from within the listbox and the control automatically scrolls to the item matching the chars they have typed thus far. Example:
by: Zürcher See | last post by:
Having the webbrowser in a windows form is possible to block a javascript allert message? Is possible to catch the modal windows popup event?
by: Chris Soulsby | last post by:
Hi, I'm displaying a html page in the AxWebBrowser web control. The html contains some JavaScript. When I run this in IE it all works fine, however, when I run it in AxWebBrowser I get a "object expected" scripting error when a click event is raised. Can anyone help?
by: Simon CJC | last post by:
Hello I use AxSHDocVw.AxWebBrowser in a windows application. But sometimes the url I browsed in AxSHDocVw.AxWebBrowser contains error caused by javascript. Can I prevent javascript from running in AxSHDocVw.AxWebBrowser Thanks Simon CJC
by: Alexander Wehrli | last post by:
Hello, In my application, I display help-content (html-documents) in a AxWebBrowser. The AxWebbrowser contains by default a contextmenu (well known from IE). But i don't want the user to be able to select one of the Options this ContextMenu gives. I absolutely want to disable this ContextMenu! But I've got no idea how to do this!?!
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 "WebView"/Tasks pane on the left side of the file view? I've looked around and know it can be done globally from the registry
by: Ajai Kumar .R | last post by:
Hai all, I'm getting javascript errors/alert windows on AxWebBrowser. Does any body know how to disable these popups. Thanks in advance. Ajai Kumar .R
by: matty | last post by:
Hi, I was wondering if there is a known statistic on how many people disable javascript support from their client, and if they do is it intentional or by some default, and when it is intentional what is the reason behind it? For example, I have disabled Flash support and I realize that a lot of sites will just not even check if I support it or not and will just show me a blank page, and they don't see to care/know about it.
by: jpaul | last post by:
Hi I am very new to this two If the browser disable the javascript, what happen to Ajax? can i slove the problem by using server side script? any suggestion for this? i currently do some dirty projects with perl/cgi, and I would like to add more client side features which relate to ajax, and do some validation on the client side with javascript. but it is possible that the javascript may be disable with some browsers. what can i do if...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.