Jump to content

Recommended Posts

Posted (edited)

Hi!

I have such a HTML code:

<div style="width: 400px; height: 42px; background: transparent url('webapps/front/html/eska_rock/img/top10/item_1.png') no-repeat top center; margin-bottom: 2px; position: relative;">
<a href="?page=show_song_eska_rock&also_id=12785">
<img width="30" src="work/privatefiles/songAJHAE" alt="utwór" title="tekst Every Teardrop Is A Waterfall" style="border: 1px solid white; position: absolute; top: 5px; left: 52px;"/>
</a>
<span style="position: absolute; top: 5px; left: 90px; width: 200px;">
<a href="?page=show_song_eska_rock&also_id=12785" title="tekst utworu Every Teardrop Is A Waterfall" style="font: bold 12px/0.4cm Arial, Tahoma, Verdana; color: white; text-decoration: none;"> Every Teardrop Is A Waterfall </a>
</span>
<span style="position: absolute; top: 23px; left: 90px; width: 200px;">
<a href="?page=artists_eska_rock&alar=1960" title="utwory Coldplay" style="font: normal 10px/0.4cm Arial, Tahoma, Verdana; color: #959292; text-decoration: none;"> Coldplay </a>
</span>
<script type="text/javascript">
                        musicArray['ph_tresc_glowna_sonqmgx6D']="http://content.eska.pl/work/privatefiles/sonqmgx6D";                       </script>
<div style="position: absolute; top: 9px; right: 78px;" id="ph_tresc_glowna_sonqmgx6D">
<a href="javascript:PlayButton_loadMusic('ph_tresc_glowna_sonqmgx6D')">
<img style="margin: 0; padding: 0" src="http://content.eska.pl/webapps/front/html/player/eskaMusicPlayerRock/eskaPlayer_load.gif"/>
</a>
</div>
<a href="?page=show_song_eska_rock&also_id=12785">
<img src="http://content.eska.pl/webapps/front/html/img/video_status_ico.gif" alt="Teledysk" title="Teledysk" swidth="24" height="24" border="0" alt="Teledysk" style="position: absolute; top: 9px; right: 46px;"/>
</a>
<img src="webapps/front/html/eska_rock/img/top10/vote_1.png" width="24" height="24" id="12785" border="0" alt="" style="position: absolute; top: 9px; right: 16px; cursor: pointer;" onclick="javascript: addVote('12785',1);"/>
<input type="hidden" id="12785-input" value="0"/>
</div>
(with more images of course)

and I want to click image:
<img src="webapps/front/html/eska_rock/img/top10/vote_1.png" width="24" height="24" id="12785" border="0" alt="" style="position: absolute; top: 9px; right: 16px; cursor: pointer;" onclick="javascript: addVote('12785',1);"/>
but my code doesn't work... It finds an image, but doesn't actually click it...[code=auto:0]#include <IE.au3>$oIE = _IECreate("http://www.eskarock.pl/index.php?page=lista_nrd")$oImgs = _IEImgGetCollection($oIE)For $oImg in $oImgs If StringInStr($oImg.id, "12785") Then _IEAction($oImg, "click") MsgBox(0, "info", "clicked") EndIfNext What am I doing wrong? Edited by karlkar
Posted

Hi!

I have such a HTML code:

<div style="width: 400px; height: 42px; background: transparent url('webapps/front/html/eska_rock/img/top10/item_1.png') no-repeat top center; margin-bottom: 2px; position: relative;">
<a href="?page=show_song_eska_rock&also_id=12785">
<img width="30" src="work/privatefiles/songAJHAE" alt="utwór" title="tekst Every Teardrop Is A Waterfall" style="border: 1px solid white; position: absolute; top: 5px; left: 52px;"/>
</a>
<span style="position: absolute; top: 5px; left: 90px; width: 200px;">
<a href="?page=show_song_eska_rock&also_id=12785" title="tekst utworu Every Teardrop Is A Waterfall" style="font: bold 12px/0.4cm Arial, Tahoma, Verdana; color: white; text-decoration: none;"> Every Teardrop Is A Waterfall </a>
</span>
<span style="position: absolute; top: 23px; left: 90px; width: 200px;">
<a href="?page=artists_eska_rock&alar=1960" title="utwory Coldplay" style="font: normal 10px/0.4cm Arial, Tahoma, Verdana; color: #959292; text-decoration: none;"> Coldplay </a>
</span>
<script type="text/javascript">
                        musicArray['ph_tresc_glowna_sonqmgx6D']="http://content.eska.pl/work/privatefiles/sonqmgx6D";                       </script>
<div style="position: absolute; top: 9px; right: 78px;" id="ph_tresc_glowna_sonqmgx6D">
<a href="javascript:PlayButton_loadMusic('ph_tresc_glowna_sonqmgx6D')">
<img style="margin: 0; padding: 0" src="http://content.eska.pl/webapps/front/html/player/eskaMusicPlayerRock/eskaPlayer_load.gif"/>
</a>
</div>
<a href="?page=show_song_eska_rock&also_id=12785">
<img src="http://content.eska.pl/webapps/front/html/img/video_status_ico.gif" alt="Teledysk" title="Teledysk" swidth="24" height="24" border="0" alt="Teledysk" style="position: absolute; top: 9px; right: 46px;"/>
</a>
<img src="webapps/front/html/eska_rock/img/top10/vote_1.png" width="24" height="24" id="12785" border="0" alt="" style="position: absolute; top: 9px; right: 16px; cursor: pointer;" onclick="javascript: addVote('12785',1);"/>
<input type="hidden" id="12785-input" value="0"/>
</div>
(with more images of course)

and I want to click image:
<img src="webapps/front/html/eska_rock/img/top10/vote_1.png" width="24" height="24" id="12785" border="0" alt="" style="position: absolute; top: 9px; right: 16px; cursor: pointer;" onclick="javascript: addVote('12785',1);"/>
but my code doesn't work... It finds an image, but doesn't actually click it...[code=auto:0]#include <IE.au3>$oIE = _IECreate("http://www.eskarock.pl/index.php?page=lista_nrd")$oImgs = _IEImgGetCollection($oIE)For $oImg in $oImgs If StringInStr($oImg.id, "12785") Then _IEAction($oImg, "click") MsgBox(0, "info", "clicked") EndIfNext What am I doing wrong?

Ok.. I cheated a bit and it works with:

$oIE.document.parentWindow.execScript('addVote(''12785'',1);')

Now I have another problem - I cannot submit that form!

<form method="post" action="?page=lista_nrd&ph_tresc_glowna_start=submit" name="mainFormX" id="mainFormX" style="margin: 0px;" onsubmit="return submitForm();">
...
<input type="submit" style="width: 158px; height: 34px; border: 0px; background: black url('webapps/front/html/eska_rock/img/top10/submit.png') no-repeat top left; position: relative; left: 113px; cursor: pointer;" value=""/>

I tried with _IESubmitForm(), but didn't work.

I tried to fing image that contains submit.png, but there were no results... What to do?

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
×
×
  • Create New...