BrianTheLibrarian Posted February 17, 2017 Share Posted February 17, 2017 Hello I am trying to submit this form <form name="nextPageForm" style="margin: 0px; padding: 0px;" action="template.php" method="post"> <input name="navRow" type="hidden" value="3"> <div onclick="document.forms.nextPageForm.submit()"> <img alt="next page" src="./images/icons/button_right.png"><br>next page </div> </form> I tried searching through the div tags for the inner text, then trying to fire the onclick of the div but that didn't work. $tags = $oIE.document.GetElementsByTagName("div") For $tag in $tags If $tag.innertext = "next page" Then $tag.fireEvent("onclick") _IEAction($tag, "click") EndIf Next Trying to just click on the image didn't work _IEImgClick($oIE, "next page", "alt") And just tried to submit the form. No luck so far. Any ideas or code examples would be greatly appreciated. Link to comment Share on other sites More sharing options...
Subz Posted February 17, 2017 Share Posted February 17, 2017 (edited) Use StringStripWs with flag 7 around $tag.innertext should work, as you have a @lf in the name i.e. <br>. Edited February 19, 2017 by Subz BrianTheLibrarian 1 Link to comment Share on other sites More sharing options...
BrianTheLibrarian Posted February 19, 2017 Author Share Posted February 19, 2017 Thanks that worked! $tags = $oIE.document.GetElementsByTagName("div") For $tag in $tags $strip = StringStripWs($tag.innertext, 7) If $strip = "next page" Then $tag.fireEvent("onclick") _IEAction($tag, "click") EndIf Next 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