nofile Posted July 12, 2010 Share Posted July 12, 2010 (edited) first of all, i am sorry for my poor englishmy question is:One form includ two <input> bottons with the same "name" or "id",but how to click one button?i try to use $oSubmit = _IEFrameGetObjByName($oFrameRightin, "send")_IEAction($oSubmit,"click")or$colInputs = _IETagNameGetCollection($oFrameRightin, "input") For $oSubmit in $colInputs If String($oSubmit.value) = "send" Then _IEAction($oSubmit, "click") EndIfNext but failed,i hope somebody can help me,thank you very much Edited July 12, 2010 by nofile Link to comment Share on other sites More sharing options...
nofile Posted July 13, 2010 Author Share Posted July 13, 2010 who can help me?i am wating all the time, thank you very much Link to comment Share on other sites More sharing options...
Juvigy Posted July 13, 2010 Share Posted July 13, 2010 Post the html code for the 2 buttons.Which one do you want to click - the first one or the second one? Link to comment Share on other sites More sharing options...
nofile Posted July 13, 2010 Author Share Posted July 13, 2010 Post the html code for the 2 buttons.Which one do you want to click - the first one or the second one?Thanks for your response,clik any one of them is ok.the form contains two <div> with the same code: <div class="setToolbar setToolbarBtm"> <input type="button" onclick="sendsmt('send.y');" onmouseout="this.className='Btn BtnPos ImgBtn'" onmouseover="this.className='Btn BtnHV ImgBtn'" value="send" class="Btn BtnPos ImgBtn" name="send"><input type="button" onclick="SetFavOrg();sendsmt('save');" onmouseout="this.className='Btn BtnPos'" onmouseover="this.className='Btn BtnHV'" value="save" class="Btn BtnPos" name="savetodraft"><input type="button" onclick="sendsmt('sendaddr')" onmouseout="this.className='Btn BtnPos'" onmouseover="this.className='Btn BtnHV'" value="adress" class="Btn BtnPos" name="sendaddr"><input type="button" onclick="document.location='/coremail/fcg/ldapapp?funcid=foldmain&sid=PAmTPRFyhSRAyAWw'" onmouseout="this.className='Btn BtnPos'" onmouseover="this.className='Btn BtnHV'" value="cancel" class="Btn BtnPos"><img width="1" height="1" src="http://tom.allyes.com/main/adfshow?user=Tom.com|mms|mms_5&db=tom"> </div> Link to comment Share on other sites More sharing options...
nofile Posted July 13, 2010 Author Share Posted July 13, 2010 the botton i wanted to click is: <input type="button" onclick="sendsmt('send.y');" onmouseout="this.className='Btn BtnPos ImgBtn'" onmouseover="this.className='Btn BtnHV ImgBtn'" value="send" class="Btn BtnPos ImgBtn" name="send"> Link to comment Share on other sites More sharing options...
Juvigy Posted July 13, 2010 Share Posted July 13, 2010 Try : $oIE = _IEAttach($link, "url") $oDoc = _IEDocGetObj($oIE) $oArray = $oDoc.getElementsByTagName ("input") For $element In $oArray If $element.name = "Send" And $element.value = "Send" Then _IEAction($element, "click") Exitloop Endif Next Link to comment Share on other sites More sharing options...
nofile Posted July 13, 2010 Author Share Posted July 13, 2010 Try : $oIE = _IEAttach($link, "url") $oDoc = _IEDocGetObj($oIE) $oArray = $oDoc.getElementsByTagName ("input") For $element In $oArray If $element.name = "Send" And $element.value = "Send" Then _IEAction($element, "click") Exitloop Endif Next is ok!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