were you able to resolve this ? I have read so many posts, but no real answer for this one .. atleast what others suggested is not working for me.
I tried many things, like WinWaitActive, WinActivate, ControlClick, IEAction but no use.
here is my code ( simplified case )
TEST.HTML
----------
<HTML>
<script>
function test()
{
if(confirm("OK??"))
location.href="test2.html";
}
</script>
<BODY>
HI
<a href="#" onclick="test()">Test Link</a>
</BODY>
</HTML>
TEST2.HTML
------------
<HTML>
<BODY>
Test 2
</BODY>
</HTML>
AutoIt script
--------------
$oIE = _IECreate ("http://localhost/test.html")
_IELinkClickByText($oIE,"Test Link")
WinWaitActive("[TITLE:Microsoft Internet Explorer; CLASS:#32770; ]","OK??")
ControlClick("[TITLE:Microsoft Internet Explorer;CLASS:#32770]", "OK??", "[CLASS:Button; TEXT:OK; INSTANCE:1]")
Exit