Sign in to follow this  
Followers 0
Qualitybit

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

2 posts in this topic

#1 ·  Posted (edited)

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.

thx

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="http://192.168.112.17/img/inc.gif" border="0" alt="Increase" title="Increase" /></a>

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

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

</th>

</tr>

I searched the forum and tried to:

- navigate the javascript with _IENavigate

and

- 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? :-]

@jerre155

thx a lot for moral support man ^^

Edited by Qualitybit

[font="Courier New"][center]Me vs. 127.0.0.1 =>> 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  
Followers 0