user1939371
user1939371

Reputation: 95

Asp.net Using JavaScript

    function iframeLoaded() {
        var iFrameID = document.getElementById('iframe_login');
        if (iFrameID) {
            // here you can meke the height, I delete it first, then I make it again
            iFrameID.height = "";
            iFrameID.height = iFrameID.contentWindow.document.body.scrollHeight + "px";
        }
    }

This script is not working in Mozilla firefox but it works in chrome.

Upvotes: 1

Views: 61

Answers (1)

Roar
Roar

Reputation: 2167

use jquery, http://api.jquery.com/height/

 function iframeLoaded() {
        var iFrameID = $('#iframe_login');
        if (iFrameID) {
            iFrameID.height(...)
        }
    }

Upvotes: 2

Related Questions