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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

close window after update

Status
Not open for further replies.

JohannIcon

Programmer
Sep 3, 2002
440
MT
Hi All,

Let me give you my scenario. The user is presented with a list of articles and basically, he can amend these and add new articles. What I am doing is that when the user chooses to add an article, a pop up window is displayed and the user can enter data. Then when the user presses add article in this popup window, I am inserting the new data into the database and then I wish to close the window, however I do not know how to do this. I did a simple Javascript :-

<SCRIPT LANGUAGE=&quot;JScript&quot;>
function closeWindow() {
window.close();}
</SCRIPT>

How can I call this from the ASP now?

Thanks for your help
 
Remove the function part of it, ie make it run as the page loads.
Code:
<SCRIPT LANGUAGE=&quot;javascript&quot;>
    window.close();
</SCRIPT>
[code]
 
Cheers for this...
I needed to save the details of the popup and then close the window
so I used:
<% if LCase(Request(&quot;Action&quot;)) <>&quot;&quot; then %>
<SCRIPT LANGUAGE=&quot;javascript&quot;>
window.close();
</SCRIPT>
<% end if %>
at the start of the html stuff :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top