how to close a javascript window when asp script end

N

Navin

i open the file download.asp from another main.asp page using
window.open
what the problem is when i clikc on the hyperlink it prompts me the
ie save dialog box
taht fine.
but when the script ends in download.asp i wanna close the
download.asp .asp window open in background..
but that not working.
how to close the window download.asp as i wanna save the content in
text format i dont wnat to use the body unload event handler as the
html tags will be printed in the text file
guys give yr inputs i am stuick in this..




function downloadWIN( windowURL ) {
return window.open( windowURL,'download',
'width=10,scrollbars=0,height=10,toolbar=0,location=0,directories=0,status=0,menuBar=0,screenX=50,screenY=50,left=50,top=50'
) }

download sample</font></a>
</td>
</tr>



here my file download.asp

<%
dim StrFileName
StrFileName="a.txt"
Response.ContentType = "text/plain" 'Content Type For File Download
in Csv Format
Response.AddHeader "content-disposition","attachment; filename=" &
StrFileName 'Prompt the user For File Download
Response.Buffer=true
Response.Write "hi"
%>
<script>
self.close()
</script>
 

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

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top