admin管理员组文章数量:1287119
I have a regular page.When i clicked on a button it will be open in that page with some asp controls. what i need is that i want to open that page in a pop up page with close button inside it.I searched but i didn't find a properly cod for this. can any body help me? thanks
I have a regular page.When i clicked on a button it will be open in that page with some asp controls. what i need is that i want to open that page in a pop up page with close button inside it.I searched but i didn't find a properly cod for this. can any body help me? thanks
Share Improve this question edited Dec 25, 2012 at 15:10 asked Dec 25, 2012 at 14:59 user1877170user1877170 5- You might want to look in to jQuery UI dialog, if I understand your question correctly. jqueryui./dialog – Elad Lachmi Commented Dec 25, 2012 at 15:06
- thank you for your replying.but in need some thing like the picture in my question.(I edited it) just open my next page though a button, in a new page with out any toolbar like that. – user1877170 Commented Dec 25, 2012 at 15:12
- For this you can use the window open method w3schools./jsref/met_win_open.asp – Elad Lachmi Commented Dec 25, 2012 at 15:13
- thank you, the problem of this cod is that it open a blank page and after clicking on my button the main page is also redirect to the next page. and i don't want it. – user1877170 Commented Dec 25, 2012 at 15:18
- Look at the answer I posted. If you still don't manage to get it working, post the code you have, and I can help you fix it. – Elad Lachmi Commented Dec 25, 2012 at 15:20
5 Answers
Reset to default 1<script type="text/javascript">
function OpenPopup() {
window.open("ProductClass.aspx", "List", "toolbar=no, location=no,status=yes,menubar=no,scrollbars=yes,resizable=no, width=900,height=500,left=430,top=100");
return false;
}
</script>
You can use windows.open in javascript.
<html>
<body>
<script type="text/javascript">
function windowOpen() {
myWindow=window.open('http://myurl.','_blank','width=200,height=100, scrollbars=no,resizable=no')
myWindow.focus()
}
</script>
<input type="button" value="Open Window" onclick="windowOpen()">
</body>
</html>
Use return before your function
<html>
<body>
<script type="text/javascript">
function windowOpen() {
myWindow=window.open('http://myurl.','_blank','width=200,height=100, scrollbars=no,resizable=no')
myWindow.focus()
return false;
}
</script>
<asp:button id="btnClick" text="Open Window" onClientClick="return windowOpen()">
</body>
</html>
Use the below code
ClientScript.RegisterStartupScript(typeof(Page), "MessagePopUp", "window.location.href = 'Home.aspx';", true);
hi all Kindly use the below code
function ShowPopup() {
$("#panOne").dialog({
autoOpen: true,
appendTo: "form",
height: 600,
width: 900
});
}
appendTo: "form"
is Important as if you are not using it will autopostback
all values
本文标签: javascriptOpen my new page in pop up in aspnetStack Overflow
版权声明:本文标题:javascript - Open my new page in pop up in asp.net - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741306757a2371411.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论