views:

21

answers:

1

Hi,

The purpose is to let people embed my iframe at a certain size say 100*100, but then per user clicks this iframe should resize itself to the page size and back.

This should be independent of the structure of the HTML embedding the iframe (if possible).

Is it doable?

Guy

A: 

That is easily possible since an iframe is just an node on the page. I strongly recommend using iframes, however. My suggestion is to find another way. Iframes tend to be a portal for the passage of malicious client-side code.

Since the code in the iframe comes from us I can tell it's not malicious. But to the question it self, how can I get the size of the parent page and locate the iframe from inside the iframe?
guytom
You cannot. Even if you are not in violation of cross domain sandbox the DOM does not support a multi-agent environment necessary to accomplish your objective. The only multi-agent DOM in existence is a protected aspect of Mail Markup Language.