Sign in to follow this  
Followers 0
Erik.

Javascript

7 posts in this topic

#1 ·  Posted (edited)

Dear forum users,

I have a website whit some javascript/ html code etc.

Want to click on a javascript link.

Only problem is it will not work.

What i tried was:

#include <IE.au3>

$oIE = _IECreate ("http://10.21.31.139",0,1,1,0)
sleep(3000)
_IENavigate($oIE,"java script:StartRecording(1);")
sleep(2000)
_IEQuit($oIE)

The link is:

<a href="java script:StartRecording(1);"> <img hieght="29" border="0"width="36" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('recl','','btn_record_hover.gif,1)" onmouseup="MM_swapImage('recl',"",'btn_record_hover.gif',1)" onmousedown="MM_swapImage('recl','','btn_record_pressed.gid',1)" name="recl" title="Opname camera 1 starten" src="http://10.21.31.139/btn_record_normal.gif"/>

Hope you can help me to click that button, so the javascript will run.

Edited by Erik.

I little problem, hard to find and fix

Share this post


Link to post
Share on other sites



yeah i know, when i set them together it even does not work for me :)


I little problem, hard to find and fix

Share this post


Link to post
Share on other sites

Untested but please try this:

$oDoc = _IEDocGetObj($oIE)
$oArray = $oDoc.getElementsByTagName("a")

for $element in $oArray
if $element.title="Opname camera 1 starten" then _IEAction($element,"click")
next

Share this post


Link to post
Share on other sites

Thanks for your script, but it does not work at all :)

I found i had a frame called inner_frmset.html i can open the file but it still does not work.

Hope you can help.


I little problem, hard to find and fix

Share this post


Link to post
Share on other sites

Can you post the site - i want to test. Or give me the full source code of the html.

Share this post


Link to post
Share on other sites

Hi,

Yeas i will post the site for you, hope i can get the source.

It will be Theusday because i am now free those days.


I little problem, hard to find and fix

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