Jump to content

Inject Javascript in IE


Raju
 Share

Recommended Posts

I can inject Javascript by _IEHeadInsertEventScript() function. But the code only runs when "onclick" or "oncontextmenu" event is fired. Is there any way to inject javascript/JQuery to any page and run immediately and automatically with or without _IEHeadInsertEventScript() function.

Link to comment
Share on other sites

  • Moderators

Eval or if your IE is less than IE11 ExecScript.  The javascript is put in the DOM for that session, but if refreshed or navigated away, you'll obviously have to re-insert.

Example:

$goIEObject.document.parentWindow.Eval("alert('see');")

Edit:

I wrote an >extended library that shows some of the use, but the insert codes are hexed strings, just javascript functions used to get things done.

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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...