if i append to body of main page
would it work?
here my first try, but seems no luck... I thhink I am escaping wrong way...
Could you hint out, pleaseee...
Paste from JSFIDDLE
I assume you are saying that you want to access the parent window from within the iframe window. To do this, all you need to do is:
a. Make sure the parent window has the same "document.domain" as the child iframe, for example "domain.com"
b. You can dynamically add a variable to the parent document by simple doing:
window.top.myNewVariable = "yay";
In the above example, "myNewVariable" would be accessible from the parent document.
c. If you want to include an external script into the parent document, go ahead and create the script tag and append it to the parent document.
Let me know if that works for you!