Jump to content

Clicking javascript button


Go to solution Solved by Danp2,

Recommended Posts

Hello! Its my first time on this forum, usually i was just reading topics here, but from the beggining of my adventure with AutoIt! i have problems with clicking buttons in IE.

 

Always i was using something like that:

Local $oInputs = _IEFormElementGetObjByName($ie, "submit")
For $oInput In $oInputs
If $oInput.title == "login" Then
_IEAction($oInput, "click")
_IELoadWait($ie)


Exitloop
EndIf
Next

And now i have problem with new button/page :

 

<a title="Login" href="javascript:void(0);" onclick="submitLogin(document.loginForm);return false;" class="btn-senden btn-login">Login</a>

Im fighting with clicking this button for like 2 days, i read whole forums and still cant find any solutions, can you please good peoples help me?

 

Thanks in advance

Link to comment
Share on other sites

  • Moderators

I have run into the same issue (below) and have found the same thing that Danp2 is suggesting. I would remind the OP that this is not a forum where you sit about bemoaning the fact that your script doesn't work, hoping someone will barf up code for you. Do a forum search as has been suggested, and try some things on your own, and you should hit upon the answer in short order.

'?do=embed' frameborder='0' data-embedContent>>

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

 

Sorry, but I'm not a mind reader. When the standard _IE methods don't work on Javascript, you typically have to resort to using execScript.

I note from your html that you are dealing with a link. Did you try this?

_IELinkClickByText($oIE, "Login")

 

Very very thank you man, didnt even expectet that can be so easy, i was trying 20 lines scripts and this one just worked.. Love you!

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
 Share

  • Recently Browsing   0 members

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