Jump to content

help me ! click button need onclick javascrip func


Recommended Posts

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

full code of this button

<td class="Forum_Item" colspan="2" align="center"> <input name="MethodType" value="QuickReply" type="hidden"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input value="Gửi" name="HbQySMknEPGPPBC" type="hidden">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input value="Gửi" name="HbQySMknEPGPPBC" style="font-family: Arial; font-size: 10pt;" onclick="java script: return confirmTL();" type="submit"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input value="Gửi" name="HbQySMknEPGPPBC" type="hidden">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </td>

Edited by khanh3t
Link to comment
Share on other sites

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"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<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 by khanh3t
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...