473,396 Members | 2,013 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,396 software developers and data experts.

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.
Windy.
Nov 21 '05 #1
2 6391
Windy,

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,

Cor
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.dll 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

http://www.freevbcode.com/ShowCode.Asp?ID=5635

Regards

Michel Posseth [MCP]
<Windy> wrote in message news:%2****************@TK2MSFTNGP15.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.
Windy.

Nov 21 '05 #3

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

Similar topics

2
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...
3
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?
4
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...
3
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...
2
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...
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...
3
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
11
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...
8
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...
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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
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,...
0
jinu1996
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...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.