Jump to content
Sign in to follow this  

_IEFormElementOptionSelect() help please

Recommended Posts

I'm hoping someone can bump me in the right direction.

Within an internal company website there is a page I'm trying to automate, this page has a table containing a number of employee's Names, their ID's and a drop-down list of what their working hours should be charged as.

I'm trying to automate the entry to the webtool from a shared excel document.

In the example below the select element's are dynamically named based on the employee's ID. The column beside the select box contains the employee's name and what I've done is dumped the table to an array and searched the name column to match up with the employers name from the spreadsheet to find out which row the select box I need to change is.

$oIE = _IECreate("http://Fakewebsite.com", 1)

$oIE = _IECreate("http://Fakewebsite.com/", 1)

        $TableOfBoxes = 8 ;The table containing the data I want to mess with is table #8 on the page.
    $oTable2 = _IETableGetCollection($oIE, $TableOfBoxes)
    $aTableData2 = _IETableWriteToArray($oTable2, True) ; Write the table to an array so I can analyze it.
    ;Determine how many rows are in Table 13
    $mydim2 = UBound($aTableData2, 1)

    $RowOFActivitytocomplete = "None Found" ;declare starting variable for future error checking.

        ;Compare the row of names in the current sheet with the array value from the spreadsheet and add some zero's.
    For $j = 0 To $mydim2
    If $aTableData2[$j][5] = $aTableData[$i + 2][8] &"    " Then
        $RowOFActivitytocomplete = $j


       ;I found out that the $j (the row that contains the user I want to change) is 2.  If I could somehow count how many select element's there are and then change it by index.  Or if I could use the index to determine the name of the select then use _IEFormGetObjByName I could change it.  I just don't know how which function/syntax to use.


<html><body><form action=""><select name="w_1502397_sch" class="small" onchange="PBSchChange(1502397);"><option value="Vacation">Vacation</option><option value="Sick">Sick</option><option value="FullTime">FullTime</option><option value="Part-Time">Part-Time</option></select><select name="w_6786455_sch" class="small" onchange="PBSchChange(6786455);"><option value="Vacation">Vacation</option><option value="Sick">Sick</option><option value="FullTime">FullTime</option><option value="Part-Time">Part-Time</option></select><select name="w_45674567_sch" class="small" onchange="PBSchChange(45674567);"><option value="Vacation">Vacation</option><option value="Sick">Sick</option><option value="FullTime">FullTime</option><option value="Part-Time">Part-Time</option></select></form></body></html>

Share this post

Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...