My page (lets call it P1) has an iframe in which I load another html page (P2). That iframe page is to be opened only in a pseudo or a trial mode in P1.
From P1’s scope, is it possible to access P2’s scope and mark a boolean variable before P2’s $(document).ready() function is called using the iframe’s contentWindow look-up or otherwise?
Thanks.
Why not use a querystring in the
srcattribute of P1’s iframe which passes the boolean that dictates how P2 behaves? Then, use some server-side script in P2 to grab the variable from the querystring and handle it accordingly before the page loads?e.g:
P1 code:
P2 code: