473,386 Members | 1,820 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,386 software developers and data experts.

Closing a web browser dialog

Hi all,
I have a VB automating an IE web browser.
At certain URLs the IE raises modal dialogs.
My question is how do i close it by automation since i can't continue navigating till the dialog is closed.

the code looks like this:
Expand|Select|Wrap|Line Numbers
  1.     Dim IE As Object
  2.     IE = CreateObject("InternetExplorer.Application")
  3.     IE.Navigate2(someURL, 0, "", "", Header)
As mentioned after this line a model dialog pops up and i need to close it before i can continue to navigate to other URLs.

Thanks for the help.
Sep 9 '10 #1
1 1866
What kind of dialog? Is it an alert? I think on the browser control there is an execute script method that will allow you to execute some javascript in the browser. You could override the browsers alert function so it does not do anything. Execute some thing like below to over the alert to an empty method.

window.alert=function() {};
Sep 22 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Jacek Jurkowski | last post by:
Does anybody know why Folder Browser Dialog stops to show folders while run from some form with image? If I clear Image property of Picture Box Folder Browser works fine after image restore it...
3
by: Tim | last post by:
I have a page that is opening another page using the showmodaldialog. In the page being shown there are two asp buttons. When the code finishes in the click event for either button I want to...
4
by: DM | last post by:
Is there any way, using a server control, to execute a routine (say, add record to database) and then close the browser window. I'm having a difficult time doing this using a master\detail model...
1
by: Audrey | last post by:
Hi Need some advice here.. I have a frame with a hyperlink to logout from the site When the Logout link (on the left frame) is clicked, a page stating "You've logged out. Please login again" is...
1
by: Dustin | last post by:
When trying to use a folder browser dialog, my application freezes. I found this is only when I set the default to "MyDocuments". Has anyone experienced something similar. I'm thinking it's a...
5
by: Oenone | last post by:
I have a VB.NET form which I'm displaying modally using the ShowDialog() method. Within the form is a Cancel button, and I've set this button into the Form's CancelButton property so that...
8
by: ds_lewis | last post by:
Is there a way to tell when the user closes the browser that doesn't also happen when a page is merely being refreshed? Thanks, Targus
1
kamill
by: kamill | last post by:
HOW CAN I CALL PHP SCRIPT WITH CLOSING BROWSER?? I need to run a PHP script (that contains a Mysql Updation query) with the closing of browser. How can i do it?
5
kamill
by: kamill | last post by:
i need to run a php script with closing browser. how can i do it. Please repply as soon as possible.
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
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
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
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...

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.