Jump to content
Sign in to follow this  

(solved) fail while clicking on a icon that initiates javascript inside a table :(

Recommended Posts


And the winner of the silver dale medal is mikehunt ^^

Do a _IEtagnamecollection over the row collecting first the anchors, second the imagetags and afterwards filtering it with stringinstr for "Increase" with a final img.click DOM usage made it work.


mike & folks

Hi folks!

I need to operate something like a little shop. First I gather the rows of the table and parsing them for the desired stuff that's available:

$oRows = _IETagNameGetCollection($oIE_rframe, "TR")

For $oRow In $oRows
    $rowText = $oRow.outerHTML
    $pos += 1
    if StringInStr ($rowtext, "available") AND StringInStr ($rowtext, $wannahave) then

Ok, now I have to click on the icon, named "Increase" thats initiate a piece of javascript, which adds the stuff to the cart. The paramters of the function seems to be unique: (itemnumber, actiontype, customerID)

<th [...]>

<a style="cursor:pointer" onclick="java script:cart(1234, 1, 4567);"><img src="" border="0" alt="Increase" title="Increase" /></a>

<a style="cursor:pointer" onclick="java script:cart(1234, 2, 4567);"><img src="" border="0" alt="Decrease" title="Decrease" /></a>

<a style="cursor:pointer" onclick="java script:cart(1234, 3, 4567);"><img src="" border="0" alt="Unload" title="Unload" /></a>



I searched the forum and tried to:

- navigate the javascript with _IENavigate


- click the image using _IE_IEImgGetCollection/ _IEImgClick by it's several modes

...but I've failed with "wrong object type" or nothing happens at all.

Who have a glue for a tiny qualitybit? :-]


thx a lot for moral support man ^^

Edited by Qualitybit

[font="Courier New"][center]Me vs. =>> 0:2But I never give up! >:-][/center][/font]

Share this post

Link to post
Share on other sites

Unfortunately, I can't help you; I'm a newbie but I do like your signature!

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