Jump to content

Internet Explorer - click a specific javascript 'link'?


Recommended Posts

Hey fellas,

I need to click a "link" in one of the sites, however it is not really a link I guess but more so a javascript thing ?

Below is a source excerpt from the site for two employees. I guess what I need to happen is the onclick below. (The the second 0 from the right being the employee ID)

onclick="window.setTimeout(function(){aspxGVCommandCustomButton('ctl00_ContentPlaceHolder1_GVSeznamZam','DET',0);},0)"

However I don't seem to be able to know how. This is the code excerpt

<td class="dxgv" align="right">7250</td><td class="dxgv">Test Name  </td><td class="dxgv">PP</td><td class="dxgv" style="color:Red;font-family:Arial;font-size:12px;">Zadává se</td><td class="dxgvCommandColumn_Glass dxgv" align="center" style="border-right-width:0px;"><img title="Zobrazit údaje docházky" class="dxgvCommandColumnItem_Glass dxgv__cci" onclick="window.setTimeout(function(){aspxGVCommandCustomButton('ctl00_ContentPlaceHolder1_GVSeznamZam','DET',0);},0)" src="../Images/Zobrazit.gif" alt="Zobrazit údaje docházky" style="border-width:0px;cursor:pointer;" /></td>
            </tr><tr id="ctl00_ContentPlaceHolder1_GVSeznamZam_DXPRow0" class="dxgvPreviewRow_Glass">
                <td class="dxgv" colspan="5"><table class="templateTable"><tr><td rowspan="3" style="width:10%; padding-left:5px;" ><div style=" max-width:70px; max-height:110px; "><img id="ASPxBinaryImage7250_0" style="max-width:70px; max-height:110px; border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px;"src="../Uploads/Foto7250.jpg"/> </div></td><td style="width:15%; padding-left:5px;"><span class='TextZakladniBold' style='font-size: 12px;font-family: Arial;color: 'black';padding: 0px;'>Datum nástupu:</span></td><td colspan="3" style="padding-left:3px;"><table cellpadding="0" cellspacing="0" style="width:100%"><tr><td style="width:35%;"><b><span style='font-size: 12px;font-family: Arial;color: Red;padding: 0px;'>1. 10. 2013</span></b></td><td style="width:15%"><span class='TextZakladniBold' style='font-size: 12px;font-family: Arial;color: 'black';padding: 0px;'>Prac. pozice:</span></td><td style="width:50%"><b><span style='font-size: 12px;font-family: Arial;color: Red;padding: 0px;'>702          Z</span></b><span style='font-size: 12px;font-family: Arial;color: black;padding: 0px;'> <b> od: </b> 1. 7. 2015</span></td></tr></table></td></tr><tr><td style="width:15%; padding-left:5px;"><span class='TextZakladniBold' style='font-size: 12px;font-family: Arial;color: 'black';padding: 0px;'></span></td><td colspan="3" style="padding-left:5px;"></td></tr><tr><td style="width:15%; padding-left:5px;"><span class='TextZakladniBold' style='font-size: 12px;font-family: Arial;color: 'black';padding: 0px;'>Středisko:</span></td><td colspan="3" style="padding-left:3px;"><table cellpadding="0" cellspacing="0" style="width:100%"><tr><td style="width:35%;">1CZ012103 BPS - OM, OV/OE, & S2Q</td><td style="width:15%"><span class='TextZakladniBold' style='font-size: 12px;font-family: Arial;color: 'black';padding: 0px;'>Zakázka:</span></td><td style="width:50%">BPO220112 Order Entry / Verification (TM)</td></tr></table></td></tr></table></td>
            </tr><tr id="ctl00_ContentPlaceHolder1_GVSeznamZam_DXDataRow1" class="dxgvDataRow_Glass dxgvDataRowAlt_Glass" style="color:Black;background-color:#C9EDF8;font-family:Arial;font-size:14px;font-weight:bold;">
              
                <td class="dxgv" align="right">2466</td><td class="dxgv">Test Name2  </td><td class="dxgv"></td><td class="dxgv" style="color:Red;font-family:Arial;font-size:12px;">Zadává se</td><td class="dxgvCommandColumn_Glass dxgv" align="center" style="border-right-width:0px;"><img title="Zobrazit údaje docházky" class="dxgvCommandColumnItem_Glass dxgv__cci" onclick="window.setTimeout(function(){aspxGVCommandCustomButton('ctl00_ContentPlaceHolder1_GVSeznamZam','DET',1);},0)" src="../Images/Zobrazit.gif" alt="Zobrazit údaje docházky" style="border-width:0px;cursor:pointer;" /></td>
            </tr><tr id="ctl00_ContentPlaceHolder1_GVSeznamZam_DXPRow1" class="dxgvPreviewRow_Glass">
                <td class="dxgv" colspan="5"><table class="templateTable"><tr><td rowspan="3" style="width:10%; padding-left:5px;" ><div style=" max-width:70px; max-height:110px; "><img id="ASPxBinaryImage2466_0" style="max-width:70px; max-height:110px; border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px;"src="../Uploads/Foto2466.jpg"/> </div></td><td style="width:15%; padding-left:5px;"><span class='TextZakladniBold' style='font-size: 12px;font-family: Arial;color: 'black';padding: 0px;'>Datum nástupu:</span></td><td colspan="3" style="padding-left:3px;"><table cellpadding="0" cellspacing="0" style="width:100%"><tr><td style="width:35%;"><b><span style='font-size: 12px;font-family: Arial;color: Red;padding: 0px;'>5. 5. 2008</span></b></td><td style="width:15%"><span class='TextZakladniBold' style='font-size: 12px;font-family: Arial;color: 'black';padding: 0px;'>Prac. pozice:</span></td><td style="width:50%"><b><span style='font-size: 12px;font-family: Arial;color: Red;padding: 0px;'>701          Z</span></b><span style='font-size: 12px;font-family: Arial;color: black;padding: 0px;'> <b> od: </b> 1. 9. 2012</span></td></tr></table></td></tr><tr><td style="width:15%; padding-left:5px;"><span class='TextZakladniBold' style='font-size: 12px;font-family: Arial;color: 'black';padding: 0px;'></span></td><td colspan="3" style="padding-left:5px;"></td></tr><tr><td style="width:15%; padding-left:5px;"><span class='TextZakladniBold' style='font-size: 12px;font-family: Arial;color: 'black';padding: 0px;'>Středisko:</span></td><td colspan="3" style="padding-left:3px;"><table cellpadding="0" cellspacing="0" style="width:100%"><tr><td style="width:35%;">1CZ012103 BPS - OM, OV/OE, & S2Q</td><td style="width:15%"><span class='TextZakladniBold' style='font-size: 12px;font-family: Arial;color: 'black';padding: 0px;'>Zakázka:</span></td><td style="width:50%">BPO220112 Order Entry / Verification (TM)</td></tr></table></td></tr></table></td>
            </tr><tr id="ctl00_ContentPlaceHolder1_GVSeznamZam_DXDataRow2" class="dxgvDataRow_Glass" style="color:Black;background-color:#E5F4F9;font-family:Arial;font-size:14px;font-weight:bold;">

 

Edited by Seminko
Link to comment
Share on other sites

There is also this piece of code which manages a dropdown menu. I want the script to click to initiate the dropdown and then select:

<td class="dxeListBoxItem_Glass">Všechny záznamy</td>
<td style="display:none;"><input id="ctl00_ContentPlaceHolder1_DLPocetVet_VI" name="ctl00_ContentPlaceHolder1_DLPocetVet_VI" type="hidden" value="5" /></td><td class="dxic" onmousedown="return aspxDDDropDown(&#39;ctl00_ContentPlaceHolder1_DLPocetVet&#39;, event)" style="width:100%;padding-left:1px;padding-right:1px;padding-top:1px;padding-bottom:1px;"><input class="dxeEditArea_Glass dxeEditAreaSys" name="ctl00$ContentPlaceHolder1$DLPocetVet" value="5 záznamů" id="ctl00_ContentPlaceHolder1_DLPocetVet_I" onchange="aspxETextChanged(&#39;ctl00_ContentPlaceHolder1_DLPocetVet&#39;)" onblur="aspxELostFocus(&#39;ctl00_ContentPlaceHolder1_DLPocetVet&#39;)" onfocus="aspxEGotFocus(&#39;ctl00_ContentPlaceHolder1_DLPocetVet&#39;)" type="text" onkeydown="aspxEKeyDown(&#39;ctl00_ContentPlaceHolder1_DLPocetVet&#39;, event)" readonly="readonly" style="height:15px;cursor:default;" /></td><td id="ctl00_ContentPlaceHolder1_DLPocetVet_B-1" class="dxeButtonEditButton_Glass" onmousedown="return aspxDDDropDown(&#39;ctl00_ContentPlaceHolder1_DLPocetVet&#39;, event)" style="width:13px;-khtml-user-select:none;"><table class="dxbebt" cellspacing="0" cellpadding="0" style="width:13px;border-collapse:collapse;border-collapse:separate;">
            <tr>
                <td class="dx"><img id="ctl00_ContentPlaceHolder1_DLPocetVet_B-1Img" class="dxEditors_edtDropDown_Glass" src="/DXR.axd?r=1_3-wJEc3" alt="v" style="border-width:0px;" /></td>
            </tr>
        </table></td>
    </tr>
</table><input type="hidden" id="ctl00_ContentPlaceHolder1_DLPocetVet_DDDWS" name="ctl00_ContentPlaceHolder1_DLPocetVet_DDDWS" value="0:0:-1:-10000:-10000:0:-10000:-10000:1" /><div id="ctl00_ContentPlaceHolder1_DLPocetVet_DDD_PW-1" style="position:absolute;left:0px;top:0px;z-index:10000;visibility:hidden;display:none;">
    <table id="ctl00_ContentPlaceHolder1_DLPocetVet_DDD_PWST-1" cellspacing="0" cellpadding="0" style="border-collapse:collapse;border-collapse:separate;position:relative;">
        <tr>
            <td onmousedown="aspxPWMDown(event,&#39;ctl00_ContentPlaceHolder1_DLPocetVet_DDD&#39;,-1,false)" style="width:200px;cursor:default;"><table id="ctl00_ContentPlaceHolder1_DLPocetVet_DDD_CLW-1" cellspacing="0" cellpadding="0" style="width:200px;border-collapse:collapse;border-collapse:separate;">
                <tr>
                    <td id="ctl00_ContentPlaceHolder1_DLPocetVet_DDD_PWC-1" style="height:100%;"><table class="dxeListBox_Glass" cellspacing="0" cellpadding="0" id="ctl00_ContentPlaceHolder1_DLPocetVet_DDD_L" style="border-collapse:collapse;border-collapse:separate;">
                        <tr>
                            <td valign="top"><div id="ctl00_ContentPlaceHolder1_DLPocetVet_DDD_L_D" class="dxlbd" style="width:100%;overflow-x:hidden;overflow-y:auto;">
                                <input id="ctl00_ContentPlaceHolder1_DLPocetVet_DDD_L_VI" type="hidden" name="ctl00$ContentPlaceHolder1$DLPocetVet$DDD$L" /><table id="ctl00_ContentPlaceHolder1_DLPocetVet_DDD_L_LBT" cellspacing="0" cellpadding="0" style="width:100%;border-collapse:collapse;border-collapse:separate;">
                                    <tr class="dxeListBoxItemRow_Glass">
                                        <td class="dxeListBoxItem_Glass">5 z&#225;znamů</td>
                                    </tr><tr class="dxeListBoxItemRow_Glass">
                                        <td class="dxeListBoxItem_Glass">10 z&#225;znamů</td>
                                    </tr><tr class="dxeListBoxItemRow_Glass">
                                        <td class="dxeListBoxItem_Glass">15 z&#225;znamů</td>
                                    </tr><tr class="dxeListBoxItemRow_Glass">
                                        <td class="dxeListBoxItem_Glass">30 z&#225;znamů</td>
                                    </tr><tr class="dxeListBoxItemRow_Glass">
                                        <td class="dxeListBoxItem_Glass">45 z&#225;znamů</td>
                                    </tr><tr class="dxeListBoxItemRow_Glass">
                                        <td class="dxeListBoxItem_Glass">Všechny z&#225;znamy</td>
                                    </tr>
                                </table>
                            </div></td>
                        </tr>
                    </table><script id="dxss_889372391" type="text/javascript">

 

Link to comment
Share on other sites

That's an input element. Try this example:

 

#include <IE.au3>

Local $oIE = _IE_Example("form")
Local $oInputs = _IETagNameGetCollection($oIE, "input")
For $oInput In $oInputs
    MsgBox(0, "Form Input Type", "Form: " & $oInput.form.name & " Type: " & $oInput.innerhtml)
Next

After that you will need to set a value for it. Try with $oInput.value = "Všechny z&#225;znamy" or = "Všechny znamy"

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...