MySpace Open Platform

A Place For Developers

Welcome Developers!

in

Welcome!

in

Changing IFRAME Height

Last post 04-28-2009 12:30 AM by rondata. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 04-21-2009 6:39 AM

    Changing IFRAME Height

    Hi,

    I'm using the MySpaceAPI client from:
    http://msappplatform.appspot.com/libs/myspace-da-php-download.zip

     My Application is an IFramed App and certain pages are cutoff by the frame.

     I've searched in the forum and it seems the way is to use this:

    gadgets.window.adjustHeight(3000); 

    Howeve, since I'm using the MySpaceAPI and not OpenSocial, how do I use this?

    What are the JS files needed to make this call work?

     Thanks!

    ----

    App Still Under Testing

  • 04-23-2009 10:48 AM In reply to

    Re: Changing IFRAME Height

     I'll check into this.

    Rhonda

     

  • 04-24-2009 8:29 AM In reply to

    Re: Changing IFRAME Height

    In a nutshell, what I added to my pages was:

    in the <head>:

    <script src="http://x.myspacecdn.com/OpenSocial/references/gadgets003.js" type="text/javascript"></script>
    <script src="http://x.myspacecdn.com/modules/common/static/js/Apps/ifpc003.js" type="text/javascript"></script>
    <script src="http://x.myspacecdn.com/modules/common/static/js/Apps/json001.js" type="text/javascript"></script>
    <script src="http://x.myspacecdn.com/OpenSocial/IFPC_externalIframe004.js" type="text/javascript"></script>
    <script type="text/javascript">
    //<![CDATA[
    MyOpenSpace.MySpaceContainer.get().registerParam("panelId", "apppanel_{APP_ID}_canvas");
    MyOpenSpace.MySpaceContainer.get().registerParam("localRelay", "http://{MY_DOMAIN}/ifpc_relay_external001.html");
    // ]]-->
    </script>

    and at the bottom of the pages:

    MyOpenSpace.MySpaceContainer.get().adjustHeight();

    It has been working fine for me. I'm not sure if all these are necessary, as I also use postTo in my code.

  • 04-27-2009 6:29 AM In reply to

    Re: Changing IFRAME Height

     Thanks GG :)

  • 04-27-2009 10:49 PM In reply to

    Re: Changing IFRAME Height

     Wow, fast reply. Thanks a million!

     :)

     Just a note for others with this issue.

    The link for this is at: 

    http://developerwiki.myspace.com/index.php?title=How_to_access_JavaScript_libraries_from_an_IFrame_and_IFPC_call_Demo_Application

    Note that you need to download the ifpc_relay_external001.html into your server. (Get it from that link).

     

  • 04-28-2009 12:30 AM In reply to

    Re: Changing IFRAME Height

     Make sure you use the new library file which is located here:

     

Page 1 of 1 (6 items)