Getting name of Javascript modal popup

ddotson

Board Regular
Joined
Nov 9, 2004
Messages
57
Good afternoon,

I continue to work through a project, whereby I am going to particular web pages and entering information.. I have came to another wall. During my code, a javascript modal popup rears its head, for which I have no control over. I have tried to use GetElementsby...., to no avail. The issue is that this is a new object, and I have no idea how to reference it. Anyone have any ideas?

Thanks, like always!
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
If you want to just click on the default button of pop-up, you can use AppActivate to bring pop-up in focus and then send keys to perform operation. Something like this:

Code:
set oWS = createobject("wscript.shell")
oWS.AppActivate("Dialog box title")
WScript.sleep 200
oWS.Sendkeys "{enter}"
 
Upvote 0
Thanks for the reply. Once the popup shows, it has two drop down and two date fields, for which I need control so that I can loop through the options and select the one that I am trying to manipulate, which I do not think I can accomplish with sendkeys?
 
Upvote 0
I the popup another instance of IE? Or is it a Java applet?
 
Upvote 0
It seems to be a Java applet, per one of our application developers (I am business / data analysis)..
 
Upvote 0
If that's the case then I think the only way you might be able to work with it would be to use the Windows API, and I'm not even sure how that would work - if it did.

Is there any way you can avoid it?
 
Upvote 0
Thank you Norie - I do not think there is anyway that I can avoid it... May have just killed my process.
 
Upvote 0
Long time since I've worked with the API but I think you'd be looking at using FindWindows, SendMessage and that sort of thing.

PS Are you sure it's an applet? What happens when you right click somewhere on it?
 
Upvote 0
When I right click on it, I get Back, Reload, Save As, Print, Translate to English, etc... Does not change when I move from the pop out to the main page.
 
Upvote 0

Forum statistics

Threads
1,223,237
Messages
6,170,924
Members
452,366
Latest member
TePunaBloke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top