Resize iframe height based on its content
This is a small experiment to showcase the possibility of resizing iframe based on its loaded content.
All you need is just add the below JavaScript function in your html.
JavaScript code:
function setIframeHeight(iframe) {
if (iframe) {
var iframeWin = iframe.contentWindow || iframe.contentDocument.parentWindow;
if (iframeWin.document.body) {
iframe.height = iframeWin.document.documentElement.scrollHeight || iframeWin.document.body.scrollHeight;
}
}
};
Call the JS function like this
window.onload = function(){
setIframeHeight(document.getElementById('iframe_id'));
}
I quickly did a small demo based on this. This is how it looks

Warning: This works only for content in the same domain. Browser will throw error for cross-domain content.
MIcrosoft Windows Phone Camp in Chennai
Of late I have been kept really busy at work and I could not blog continuously. But now I have an exciting news to share with you all. We at RIA-RUI are partnering with Microsoft to bring Windows Phone camp to Chennai. We are pleased to organize this camp for the benefit of Chennai geeks.
Date: 22nd Dec 2011
Venue: Savera Hotel, Chennai
Microsoft windows phone team would be present at the camp to share all required information for a developer to get started. So if you are a developer then can not afford to miss this opportunity.
Seats are limited. So hurry up and register!
For any questions reach me at karan@ria-rui.org or +91 9444155024
Mobile Conference in Chennai
Our team is organizing a conference for mobile community in Chennai. The conference is called Touch Tour and is scheduled to happen on 15th October 2011 at TIDEL PARK.
The conference will focus on mobile design, development and monetization. The conference will attract Students and professionals who would like to get started with mobile development.
Get more details about Touch Tour

Book you seat to avoid any disappointment!
