ariel
ariel

Reputation: 16150

Run cross-site javascript for a specific iframe in browser console for loaded page

Is it possible to run javascript commands on a browser for one iframe of the current loaded document (via console or javascript: in URL)?

Since it's a different domain, if i try document.getElementById('iframeID').contentWindow.document; i get an access denied.

Upvotes: 2

Views: 405

Answers (1)

user578895
user578895

Reputation:

if you're using firebug:

cd(frames[0]);
// run stuff now

I don't think it's currently possible in webkit debuggers (it wasn't as of about 6 months ago, but that may have changed), wouldn't have a clue how to do it in IE.

Upvotes: 4

Related Questions