SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Guru
    Join Date
    Dec 2005
    0 Post(s)
    0 Thread(s)

    Sending variable to page from iFrame?

    I'm trying to make a cross domain iframe and want the iframe to dynamic resize the height. I have read that this is not possible, but if I own both domains I thought that I in my cross domian could make an variable which tells the height of the page and then send it via the iFrame to my page.

    My crossdomain page has a javasacript like this:
    Code JavaScript:
    var pageHeight = document.getElementById("container").clientHeight;

    And my page would get the page like this:
    Code HTML4Strict:
    <iframe src="" width="100%" height="The height from my crossdomain" frameborder="0" scrolling="no">

    Can I send the pageHeight to my page?

    Thanks in advance...

  2. #2
    SitePoint Addict
    Join Date
    Apr 2011
    2 Post(s)
    0 Thread(s)
    From what I read, if it's cross-domain you can't send variables through iframe. The browser just see 2 domains.
    Free: Web Programming Courses HTML, CSS, Flash
    Web Programming: AJAX Course and PHP-MySQL Course video Lessons
    Good JavaScript and jQuery course for beginners


Posting Permissions

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