Doomer
Doomer

Reputation: 1

Can pages loaded into an iframe from another domain be scrolled via JavaScript?

If yes, could you please show me an example of how to do it?

Upvotes: 0

Views: 121

Answers (2)

bobince
bobince

Reputation: 536685

No. But you can put a large iframe in a small parent div that has CSS overflow, and then write to the div's scrollTop/scrollLeft.

Upvotes: 3

marcgg
marcgg

Reputation: 66495

No it's not possible. You have no control over an iframe from another domain for security reasons.

Upvotes: 0

Related Questions