Hi nmg,
I have checked your code,It is working fine,just add return false at the end of javascript function.
HTML
Default.aspx
<div>
<script type="text/javascript">
function getIframeText() {
var iframe0 = document.getElementById("iframe1");
var iframe0document = iframe0.contentDocument.parentWindow || iframe0.contentWindow.document;
var sourse = document.getElementById("iframe1").contentWindow.document.documentElement.outerHTML;
var x = iframe0.src;
window.open(x, 'mywindow', 'width=400,height=200,left=0,top=100,screenX=0,screenY=100')
return false;
}
</script>
<asp:Button ID="btnsend" runat="server" Text="show" OnClientClick="return getIframeText()" />
<div>
<table>
<tr>
<td style="width: 900px;">
Welcome to new topic
<div id="divsample" runat="server">
</div>
</td>
<td>
<div id="divparent" runat="server">
<iframe id="iframe1" src="mypage.htm" runat="server" height="400px"></iframe>
</div>
</td>
</tr>
</table>
</div>
</div>
mypage.html
<h1>
My Page
</h1>
Screenshot
