click a button and select a drop down item in a webpage (2)

I call up the following webpage in a frame that I do not have scripting access:
https://docmein.com/app/page/12801944916418372

I enclose the above page in the frame:
https://www.barnwellmd.com/patients/docmeinframe.html.

When I open the docmein.com page, I would like to automatically click the button:
<div class="docmein_button" id="newAppointment_12801944916418372">SCHEDULE NOW</div>

Then when the "Request New Appointment" popup opens (click on "Schedule Now" to see it) I would like to automatically select "1ST appointment for NEW PATIENTS" in the service drop down box.

In www.experts-exchange.com/Web_Development/Web_Languages-Standards/HTML/Q_28219549.html  mplungjan suggests: "2) use a proxy on barwellmd that reads the other site on the server and pretends to click the button (submits the form)". I would like to explore that option here.
LVL 39
thenelsonAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Michel PlungjanIT ExpertCommented:
It is not trivial since the date picker is triggered by JavaScript.

you need to read the data the picker gets, show a picker of your own and then submit whatever the picker submits.

We will have to look at the network traffic to see where the picker data comes from
0
Michel PlungjanIT ExpertCommented:
I had a look. I would not even try unravelling that GWT code. Sorry
0
Ray PaseurCommented:
Not sure I understand the question, but if datepicker issues are in play, there is a very popular jQuery datepicker (make a Google search).
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Michel PlungjanIT ExpertCommented:
Ray: The issue is to programatically (curl) click on a page to get a datepicker to appear and then change a dropdown, choose a date and submit (which in this case is down using GWT) to the external site

If the data returned from the clicks had been easily parsed and the endpoint easily detected, then a curl plus a parse plus a curl would have done it.

I only managed it by taking over the browsing tasks in an HTA which allowed be to click on the foreign site as much as I wanted
0
thenelsonAuthor Commented:
Actually I am not interested in choosing a date and submitting.

I just want to click the "Schedule Now" button (class = "docmein_button" and id = "newAppointment_12801944916418372") and select "1ST appointment for NEW PATIENTS" in the service drop down box.  I would be happy if I could automatically just click the "Schedule Now" button.

I tried
document.frames[0].document.getElementById('newAppointment_12801944916418372').click();  
but that didn't work.
I don't see an onclick event for the "Schedule Now" button so I am confused how the popup opens when the button is clicked.
0
Michel PlungjanIT ExpertCommented:
Exactly. It is GWT that assigns the onclick in some script, I do not even trust the ID is the same every time.

You will to be allowed to click a button across domains
0
thenelsonAuthor Commented:
The ID has been the same for ~10 openings of the page. Did you mean: "You will NOT be allowed to click a button across domains"?  Is that why the hta code worked but it does not work as htm?
0
Michel PlungjanIT ExpertCommented:
Yes. iPhone keyboard does that. NOT possible to do cross frames cross origin scripting like you wish except in an hta
0
thenelsonAuthor Commented:
Can hta be used in all browsers? Is there a way to get it to run in the browsers instead of the Windows application?
0
Michel PlungjanIT ExpertCommented:
No. HTA can be run from a windows file system and is in fact IE in a box.

Sorry to have gotten your hopes up, but if you could accomplish your task, you could imagine what would happen if your site was called citibank.hackers.com and the site in the frame was citibank.com.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
thenelsonAuthor Commented:
Well, you answered the question although I don't particularly like the answer.

Thanks again.
0
Michel PlungjanIT ExpertCommented:
You are welcome. Again sorry I provided you with something that worked for you but not for your audience...
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.