function adjustIFrame(iframe, height)
{
// jQuery(obj).attr("action")
if (!iframe.id || iframe.id=="")
{
iframe.id = "defaultIframe";
}
if (!iframe.name || iframe.name=="")
{
iframe.name = iframe.id;
}
var intHeight = parseInt(height);
var iframe = document.getElementById(iframe.id);
var iframeDom = document.frames[iframe.id];
if (iframeDom.window.document.body.scrollHeight > intHeight - 10)
{
iframe.height = iframeDom.window.document.body.scrollHeight + 20;
}
else
{
iframe.height = intHeight;
}
var idoc = document.frames[iframe.id].document;
idoc.body.onresize = function()
{
alert(iframe.id + ' resize')
var currentScrollHeight = idoc.body.scrollHeight;
if (currentScrollHeight > intHeight - 10)
{
document.getElementById(iframe.id).height = currentScrollHeight + 20;
}
else
{
document.getElementById(iframe.id).height = intHeight;
}
};
}