var resetHeight = 0; function resizeIframe(height) { var oIframeList = document.getElementsByTagName("iframe"); for (var i = 0; i < oIframeList.length; i++) { var iframe = oIframeList[i]; if (iframe.getAttribute("id") == "IframeTSE" ) { if(resetHeight==0) { resetHeight = iframe.getAttribute("height"); } if(height>resetHeight) { iframe.setAttribute("height",Math.floor(height) + 0 + "px"); if(height>1000) { iframe.setAttribute("height",Math.floor(height) + 0 + "px"); } } else { iframe.setAttribute("height",Math.floor(resetHright) + 0 + "px"); } if(window.console) { console.log(height); } } } } function ShowIframe(url, width, height) { var qstring = ""; var st='