khanh3t Posted March 13, 2009 Share Posted March 13, 2009 This is source button <input value="Gửi" name="OtqPADwbLTYLXqwpl" style="font-family: Arial; font-size: 10pt;" onclick="java script: return confirmTL();" type="submit"> function confirmTL(){ var objMsg = document.getElementById("Message"); if(objMsg != null){ var objValue = objMsg.value; objValue = objValue.replace(' ',''); if(objValue != ''){ //alert('Xác nhận gửi trả lời !'); return true; }else{ alert('Chưa nhập nội dung trả lời.'); objMsg.focus(); return false; } } return false; } i think want to click this button must mouse onclick, but i try $oForm2 = _IEGetObjByName ($oIE, 'OtqPADwbLTYLXqwpl') $oForm2.fireEvent('onclick') _IEAction ($oForm2 , "click") anybody help me this question, thx for all Link to comment Share on other sites More sharing options...
khanh3t Posted March 13, 2009 Author Share Posted March 13, 2009 (edited) full code of this button<td class="Forum_Item" colspan="2" align="center"> <input name="MethodType" value="QuickReply" type="hidden"> <input value="Gửi" name="HbQySMknEPGPPBC" type="hidden"> <input value="Gửi" name="HbQySMknEPGPPBC" style="font-family: Arial; font-size: 10pt;" onclick="java script: return confirmTL();" type="submit"> <input value="Gửi" name="HbQySMknEPGPPBC" type="hidden"> </td> Edited March 13, 2009 by khanh3t Link to comment Share on other sites More sharing options...
Authenticity Posted March 13, 2009 Share Posted March 13, 2009 Try: _IENavigate($oIE, 'java script: confirmTL();') Link to comment Share on other sites More sharing options...
khanh3t Posted March 13, 2009 Author Share Posted March 13, 2009 (edited) i have try it, but i found in code this button have 3 button name "OtqPADwbLTYLXqwpl", first and third button is hidden, want to submit must click second button have code <input value="Gửi" name="HbQySMknEPGPPBC" style="font-family: Arial; font-size: 10pt;" onclick="java script: return confirmTL();" type="submit"> not <input name="MethodType" value="QuickReply" type="hidden"> <input value="Gửi" name="HbQySMknEPGPPBC" type="hidden"> anybody help me func to get object by name second button or get object collection by name _IEGetObjByName ( ByRef $o_object, $s_Id [, $i_index = 0] ) Optional: If name of id occurs more than once, specifies instance by 0-based index 0 (Default) or positive integer returns an indexed instance -1 returns a collection of the specified objects i don't mean if set $i_index=-1 Edited March 13, 2009 by khanh3t 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