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(ByVal sender As Object, ByVal e As
System.EventArgs) Handles btnSend.Click
...do stuff....
CloseWindow()
End Sub
Private Sub CloseWindow()
'Response.Write("<script
language='javascript'>window.close();</script>")
Page.RegisterStartupScript("AutoClose", "<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*****@trendmls.com> wrote in message
news:#g**************@TK2MSFTNGP10.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.showModalDialog('DenialEmailForm.asp x?id=1234'',
'dialogWidth:650px; dialogHeight:700px; 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='javascript'>window.close();</script>")
OR
Page.RegisterStartupScript("AutoClose", "<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 !