Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is it possible to call javascript functions from asp without clicking

Status
Not open for further replies.

Scobe

MIS
Jan 31, 2003
13
GB
I need to close a window that I have opened via the window.open function. (in asp).

I do not want though to add an additional close button to call a window.close function.
I have a save button that calls some asp to save my recordset.
I want to just add a close call at the end of my save asp.

any ideas?
Hopefully I have explained myself.

steve
 
sure:

save.asp
Code:
<%
  rem do your asp stuff here
%>
<script type="text/javascript">
window.close();
</script>

=========================================================
-jeff
try { succeed(); } catch(E) { tryAgain(); } finally { rtfm(); }
 
PS ... window.close can only be used in a window that no user interaction has taken place AND was opened by another process otherwise the user will recieve a "a script is trying to close this window..." etc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top