ToyBoi Posted February 19, 2009 Share Posted February 19, 2009 (edited) Hi I'm trying to click on a javascript based calendar that is on a websiteWhat 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 febhref="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&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 February 19, 2009 by ToyBoi Link to comment Share on other sites More sharing options...
DaleHohm Posted February 20, 2009 Share Posted February 20, 2009 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 Link to comment Share on other sites More sharing options...
ToyBoi Posted February 20, 2009 Author Share Posted February 20, 2009 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.Daleactually that's exactly what I needed, why didn't I think of that before? thanks Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now