Hello All,
I have some problem with iframe...
<iframe id="myframe" src="http://www.google.co.in/" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" style="overflow:visible; width:100%; display:none"> </iframe>
I added this iframe in other web project. Now problem is i want to set iframe height dynamically as per it's content. i wrote jscript for that..but it give me Access Denied Error.on below blue color line.
function iFrameHeight() {
var h = 0;
if ( !document.all ) {
h = document.getElementById('iframe').contentDocument. height;
document.getElementById('iframe').style.height = h + 70 + 'px';
} else if( document.all ) {
h = document.frames('iframe').document.body.scrollHeig ht;
document.all.iframe.style.height = h + 30 + 'px';
}
}
finally i found that ..if you have the iframe's document from a different source to your main page then you will be Access denied error.
But i Need Strictly do that .. i want to give diffrent source to iframe and also set dynaicall height of iframe as per it's content.
How can i do that ? Please give me the solution for that.. or if you know any idea of paid control for that please suggest me.
thanx in advance..
Harshad Patel
http://p2p.wrox.com/topic.asp?TOPIC_ID=51597