+ Reply to Thread
Results 1 to 5 of 5

Thread: Dynamic iframe help

  1. #1

    Default Dynamic iframe help

    I have some iframes set up in my wiki that display different perl scripts. I would like to make them dynamic and I was wondering if there was a good way to do that. I've tried searching google for it and haven't been able to come up with anything that works for me.

    here's an example of an iframe i use:

    <iframe height="500" frameborder="0" width=100% src="http://gg.ee.com/cgi-bin/menu_01.pl"></iframe>


    Thanks in advance for your input.
    Last edited by newuser; 07-30-2008 at 05:02 PM.

  2. #2
    Join Date
    Jul 2006
    Location
    San Diego, CA
    Posts
    5,450

    Default

    Yes, you can, but not in FCK editor.

    Create a template called Template:PerlFrame with the following HTML code:
    HTML Code:
    <h1>Template:PerlFrame</h1>
    <iframe height="500" frameborder="0" width="780" src="{{ ' http://xxxxxxx.ggggggg.com/cgi-bin/' .. ($name ?? $0) .. '.pl' }}"></iframe>
    Now invoke in your target page like this:
    Code:
    {{ temlate.perlframe('kkkkkk') }}
    Steve G. Bjorg - Chief Architect
    Did you check the MindTouch FAQ?
    Found a bug? Report it.
    Follow me on Twitter
    Find us on IRC: irc.freenode.net #mindtouch

  3. #3

    Default

    After reading my first post, I realize I wasn't clear in what I was asking for. I'm looking for a way to implement an iframe that automatically or dynamically adjusts the height based on what is being displayed. So when I go from menu01.pl that has a relatively short display to menu02.pl which has a much larger menu, the iframe adjusts accordingly. Thanks and sorry for any confusion.

  4. #4
    Join Date
    Jul 2006
    Location
    San Diego, CA
    Posts
    5,450

    Default

    That's a much, much harder problem. I know it's possible, but it basically amounts to communicating via changes to the 'src' attribute from within the iframe to its container. OpenSocial uses it, but I haven't looked at the implementation in detail.

    If you find something that works, let us know!
    Steve G. Bjorg - Chief Architect
    Did you check the MindTouch FAQ?
    Found a bug? Report it.
    Follow me on Twitter
    Find us on IRC: irc.freenode.net #mindtouch

  5. #5
    Join Date
    Jul 2007
    Posts
    347

    Default

    You might wanna have a look at this:

    http://www.dynamicdrive.com/dynamici...iframessi2.htm

    Edit: Bah, drop that. I just found this note, which makes that script pretty useless:
    Note that as with SSI, the external page referenced by the iframe must be from the same domain as the page the iframe tag is inserted in. Setting the iframe's src to an external site such as "http://www.google.com" will not work, since the script cannot probe and detect the height of pages from external domains.
    Last edited by merktnichts; 07-27-2008 at 11:59 AM.

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts