Using Sub domains with Advanced iFrame

Please read this page for restrictions of this solution and Chrome.

By default you can not execute Javascript on different domains because of browser cross domain security restrictions. Advanced iFrame does use Javascript a lot for features like auto height. As solution advanced iframe has the external workaround which enables most of the local features also on the remote page.

If your iframe is on a sub domain also an easier way is possible. You still have to include one line of Javascript but the whole configuration is than like you are on the same domain and all settings can be done by shortcode.

To enable this you need to set the value “document.domain” to your main domain with Javascript. The plugin does set this value on the parent (from version 7.0.2 on) if you enable this in the administration. You can also set this manually as this version is not released yet.

If your iframe is on and your WordPress site is on you have to add


anywhere to the source code of your page of the iframe. On the parent page the plugin already does this for you.

After you have done this you can configure Advanced iFrame like you are on the same domain.

See for the documentation of this setting.

See example 42 where this way is used. Example 6 shows the same example with the “old” external workaround.

Have fun using Advanced iFrame,

Comments are closed, but trackbacks and pingbacks are open.