Close Window After click a button

L

Lin Ma

I have a ASP page with form and I want to after user click the CLOSE button,
it will perform some functions and finally Close the window.

Can I do this?

Thanks

Lin

Here is my code: File name: page1.asp

<Form method = "post" action="page1.asp">
<input name="Close" type="submit" value="Close">
<input type="checkbox" name="checkbox" value="yes">
</form>

<% if request.form("Close") = "Close" then
...........do some functions......

finally close this window. What kind of command I can use? Window.close??

end if
%>
 
B

Bob Barrows

Lin said:
I have a ASP page with form and I want to after user click the CLOSE
button, it will perform some functions and finally Close the window.

Can I do this?

Thanks

Lin

Here is my code: File name: page1.asp

<Form method = "post" action="page1.asp">
<input name="Close" type="submit" value="Close">
<input type="checkbox" name="checkbox" value="yes">
</form>

<% if request.form("Close") = "Close" then
..........do some functions......

finally close this window. What kind of command I can use?
Window.close??

end if
%>

Anything that involves interaction with a browser window requires
client-side code, which is off-topic for this group. In the future, please
post your client-side code questions to one of the groups with "dhtml" in
its name, or to one of the .scripting.* groups.

Here is a link to a similar question I answered this morning:

http://www.google.com/groups?dq=&hl....inetexplorer.ie5.programming.dhtml.scripting

HTH,
Bob Barrows
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,228
Latest member
MikeMichal

Latest Threads

Top