Jump to content

Javascript href?

Recommended Posts


I am trying to write a script that will login and click a few buttons.

I am attempting to get the script to execute the javascript function "java script:doBoot('upDef');"

I've tried using the _IEAction "click" but am not having much luck. However I'm not having any issue clicking an actual HTML link.

Heres the code:

<td nowrap align=center><a href="java script:doBoot('upDef');" onmouseover="status='Boot this image'; return true" title="Boot this image"><img src="hand.gif" border=0 width=20 height=20></a></td>

The Autoit script just needs to run through a series of tasks, at this point there is no user intervention.

Would anyone be able to point me to a resource that explains how to do this?

Thus far, I have had limited luck on the forums and Google...


Link to comment
Share on other sites

I'll guess that you need to use .fireEvent("onmouseover")

$oLinks = _IELinkGetCollection($oIE)
For $oLink in $oLinks
    If String(_IEPropertyGet($oLink, "innertext")) = 'Boot this image' Then
    $oLink .fireEvent("onmouseover")
    _IEAction($oLink, "click")


Edited by DaleHohm

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
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

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...