ejrhodes
05-14-2003, 06:58 PM
Guys,
In my ASP page, I popup a child window that contains a form. This form posts to itself in the pop-up window. After the form is submitted, processed and the page loads, I want to close the popup window.
The code for the asp page that the pop-up window calls is as follows:
<html>
<head>
</head>
<%
If request.form("action")="addemail" Then%>
<!--#include file="dsn.asp"-->
<%
sql="Update members set email='" & request.form("email") & "' where fullname='" & session("Name") & "'"
response.write(sql)
'set RS=conn.execute(sql)
'RS.Close
'Set RS=Nothing
response.write "Thanks"
%>
<body Onload="javascript:self.close;">
<%
Else
%>
<body>
In an effort to add more functionality to time tracker, please enter your email address in the form below. You will not be prompted for this again.
<form method="POST" action="emailform.asp" name="Email_Form">
User Name: <%=session("Name") %> <br>
Email Address: <input type="text box" name="email" size="30"><br>
<input type="hidden" name="action" value="addemail">
<input type="Submit" value="Thanks">
</form>
<%End If%>
</body>
</html>
What am I doin wrong with the onload command? Thanks
In my ASP page, I popup a child window that contains a form. This form posts to itself in the pop-up window. After the form is submitted, processed and the page loads, I want to close the popup window.
The code for the asp page that the pop-up window calls is as follows:
<html>
<head>
</head>
<%
If request.form("action")="addemail" Then%>
<!--#include file="dsn.asp"-->
<%
sql="Update members set email='" & request.form("email") & "' where fullname='" & session("Name") & "'"
response.write(sql)
'set RS=conn.execute(sql)
'RS.Close
'Set RS=Nothing
response.write "Thanks"
%>
<body Onload="javascript:self.close;">
<%
Else
%>
<body>
In an effort to add more functionality to time tracker, please enter your email address in the form below. You will not be prompted for this again.
<form method="POST" action="emailform.asp" name="Email_Form">
User Name: <%=session("Name") %> <br>
Email Address: <input type="text box" name="email" size="30"><br>
<input type="hidden" name="action" value="addemail">
<input type="Submit" value="Thanks">
</form>
<%End If%>
</body>
</html>
What am I doin wrong with the onload command? Thanks