0

Is it possible to get the scrollTop or offSet value of an element inside an iFrame? e.g

$("iframe").contents(".controlPanel").scrollTop();

or any other way possible?

I get a return value of null

Rory McCrossan
  • 331,213
  • 40
  • 305
  • 339
Wandile
  • 174
  • 1
  • 16
  • Have a look at this previously asked question. http://stackoverflow.com/questions/251420/invoking-javascript-code-in-an-iframe-from-the-parent-page – Maarten Venema Oct 27 '14 at 11:27
  • @MaartenVenema I need to invoke a function within my page but get the contents of the iframe to evaluate, If the function was in my iframe content that would be easier, also note that I dont have access to the iframe content. :-) – Wandile Oct 27 '14 at 11:33

1 Answers1

0

Since you addressed that you have no influence over the iframe's content there is no way to invoke JavaScript inside of it. This has to do with cross-domain policies.

Maarten Venema
  • 324
  • 1
  • 8