The popup form is submitted to itself through this button:
<asp:Button ID="btnSend" Runat="server" Text="Send Denial"></asp:Button>
Then, the click event in the code-behind sends the javascript to the page:
Private Sub btnSend_Click(B yVal sender As Object, ByVal e As
System.EventArg s) Handles btnSend.Click
...do stuff....
CloseWindow()
End Sub
Private Sub CloseWindow()
'Response.Write ("<script
language='javas cript'>window.c lose();</script>")
Page.RegisterSt artupScript("Au toClose", "<script language
=""javascript"" >window.parent. close();window. close();</script" & ">")
End Sub
So, do you think when a button is clicked on the popup form, it create
another browser window? How can I get around this?
"Zoe Brown" <zo*******@d-o-n-o-t-s-p-a-m-tfn.com> wrote in message
news:40******** @primark.com...
"SteveS" <ss*****@trendm ls.com> wrote in message
news:#g******** ******@TK2MSFTN GP10.phx.gbl... Hello. This is a strange problem which does not make sense to me.
I open a popup page with the following javascript code:
function OpenDenyWindow( changeId) {
retVal=window.s howModalDialog( 'DenialEmailFor m.aspx?id=1234' ',
'dialogWidth:65 0px; dialogHeight:70 0px; resizable:no;') ;
//alert("Return val = " + retVal)
}
The screen opens fine. However, I can't get it to close after I the
user submits the form. I run this code in my click event:
Response.Write( "<script language='javas cript'>window.c lose();</script>")
OR
Page.RegisterSt artupScript("Au toClose", "<script language
=""javascript"" >window.close() ;</script" & ">")
Both of these statements do not work.
The problem gets more interesting. If I don't try to close the form,
then a duplicate popup form appears. Now, I have 2 popup forms!
Make sense?
This has me bewildered! Any ideas what is going on?
Thank you for your help!!
SteveS
where is the form submitted ? if it is submitted to itself you are
probably seeing is close and then re-open again !