Sign in to follow this  
Followers 0
ToyBoi

Interacting with a Javascript Calendar

3 posts in this topic

#1 ·  Posted (edited)

Hi I'm trying to click on a javascript based calendar that is on a website

Posted Image

What type of object is this and how do I interact with it. It's not a radio obviously.

the function of my program is to have the user pre-enter a date, then the program should be able to navigate to that day and then extract the data.

I know how to navigate to the correct month but I don't know how to select the correct day.

below is some related code from the page source regarding the calendar.

notice there is some href stuff for each of the days for feb

href="java script:document.chart_data.selected_date.value='2009-02-12';document.chart_data.report_csv.value='false';document.chart_data.submit();">12</a></td><td class="event"><a href="java script:document.chart_data.selected_date.value='2009-02-13';document.chart_data.report_csv.value='false';document.chart_data.submit();">13</a></td><td class="event"><a href="java script:document.chart_data.selected_date.value='2009-02-14';document.chart_data.report_csv.value='false';document.chart_data.submit();">14</a></td><td class="event"><a href="java script:document.chart_data.selected_date.value='2009-02-15';document.chart_data.report_csv.value='false';document.chart_data.submit();">15</a></td></tr>
<tr><td class="selectedweeknum"><a href="/index.php?yearID=2009&amp;weekID=8">8</a></td><td class="selectedevent"><a href="java script:document.chart_data.selected_date.value='2009-02-16';document.chart_data.report_csv.value='false';document.chart_data.submit();">16</a></td><td class="selectedevent"><a href="java script:document.chart_data.selected_date.value='2009-02-17';document.chart_data.report_csv.value='false';document.chart_data.submit();">17</a></td><td class="selectedevent"><a href="java script:document.chart_data.selected_date.value='2009-02-18';document.chart_data.report_csv.value='false';document.chart_data.submit();">18</a></td>
Edited by ToyBoi

Share this post


Link to post
Share on other sites



Little can be done with what you supply, but it appears that the TD elements contain links to javascripts. Try _IELinkClickByText($oIE, "15") and see what happens.

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

Little can be done with what you supply, but it appears that the TD elements contain links to javascripts. Try _IELinkClickByText($oIE, "15") and see what happens.

Dale

actually that's exactly what I needed, why didn't I think of that before? thanks

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0