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

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
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,224,559
Messages
6,179,513
Members
452,921
Latest member
BBQKING

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