Kamakazy Posted December 18, 2012 Share Posted December 18, 2012 Hey Guys & Girls. Yet another obsticle Im faced with. First the HTML. <input type="button" value="I Agree" class="Next inputSubmit" id="Next_12961042"> As you can see, this is indeed a button, and yes, not in a form or anything usefull exept for the "ID". Now the snag, the ID changes very often, but only the number part. the "Next_" stays the same. I wanted to use _IEGetObjByName but obviously that wont work as there is no Name. If I hit the obj based on full ID, it clics but like I said, the numbers change. Is there a way that I can hook onto the "Next_" regardless of what is behind it. a wildcard of some sort? Im not asking for you to write me the code, just push me in the right direction. Please shout if im too vague. Kama. _IEFrameGetObjByID | Link to comment Share on other sites More sharing options...
jdelaney Posted December 18, 2012 Share Posted December 18, 2012 (edited) you can loop through the collection (use .getElementsByTagName()), or use my signature to use the xpath to get the object.wherexpath = "//input[contains(@id,'Next_')]"the return is an arrayhttp://www.w3schools.com/htmldom/dom_methods.asp Edited December 18, 2012 by jdelaney Rockstar504 1 IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
Kamakazy Posted December 19, 2012 Author Share Posted December 19, 2012 (edited) you can loop through the collection (use .getElementsByTagName()), or use my signature to use the xpath to get the object. where xpath = "//input[contains(@id,'Next_')]" the return is an array http://www.w3schools.com/htmldom/dom_methods.asp Great stuff, Thanx the help. UPDATE: I got it working. Thanx for the help. Kama Edited December 19, 2012 by Kamakazy Rockstar504 1 _IEFrameGetObjByID | 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