I ahve a program that opens another page through modal. When I click on a
button to close the modal page, it just reposts and does not close. I tried
this within the event handler -
Response.Write("<script language='javascript'>window.close()</script>")
But is doesn't seem to work.
Any help out there with this?
Thank youThe javascript
Response.Write("<script language='javascript'>window.close()</script>")
only works inside of the <body> tag.
either you do it this way
Response.Write("<body><script
language='javascript'>window.close()</script></body>")
or you just add the following to the Page_Load
myButton.Attributes["onclick"] = "window.close();";
Daniel Fisher(lennybacon)
http://www.lennybacon.com/
"Lyners" <Lyners@.discussions.microsoft.com> wrote in message
news:A9B2AAC7-B631-4E6F-BAB3-5C0FB9D6329E@.microsoft.com...
>I ahve a program that opens another page through modal. When I click on a
> button to close the modal page, it just reposts and does not close. I
> tried
> this within the event handler -
> Response.Write("<script language='javascript'>window.close()</script>")
> But is doesn't seem to work.
> Any help out there with this?
> Thank you
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment