WordPress.org

Ready to get started?Download WordPress

Forums

Advanced iFrame
[resolved] Hide elements in iframe, not working? (2 posts)

  1. akisha777
    Member
    Posted 1 year ago #

    I applied the cross domain scripting instructions and everything worked fine as auto height is working.

    One problem though, the hide elements in iframe doesn't seem to work?

    http://wordpress.org/extend/plugins/advanced-iframe/

  2. mdempfle
    Member
    Plugin Author

    Posted 1 year ago #

    If you want to hide elements in the iframe on cross domain you also have the same restrictions like for the resize height.

    I have written this in the settings:
    "
    IMPORTANT: This is only possible if the iframe comes from the same domain because of the same origin policy of Javascript. Please read the section "How to find the id and the attributes" above how to find the right styles. If the content comes from a different domain you have to modify the iframe page by e.g. adding a Javascript function that is then called by the onload function you can set above.
    "

    So you can set this in the settings and look in the sourcecode what is rendered there. And then you have to add this to your page. Please not that you need to include jQuery to your iframed page.

    An alternative is to pass a parameter to the iframe that you read and then hide elements depending on this parameter.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.