Response.flush not displaying content

J

jose.mendez22

I'm trying to fire a pop-up window before I execute a lengthy stored
procedure so I may utilize this window as a status window on number of
records executed. After my response.write statements which include the
javascript I call the flush mehtod, which seems is ignored? However
when I mimic the same process using a loop (and no ado object) the
flush works correctly. Does anyone have any suggestions why this is
not working or a work around? Below are two sample code snippets 1st
does not work however 2nd works?

Thanks in advance for any input!

***** Does not work? ***
If sAction = "s" Then ' submit clicked

Response.Write("<script language=""Javascript"">")
Response.Write("var objWin = window.open ""http://www.yahoo.com"",
""mywin")
Response.Write("objWin.focus();")
Response.Write("</script>")
Response.Flush

' open DB
' execute stored procedure statement
' clean ado.connection object

end if

**** Does work *****
If sAction = "s" Then ' submit clicked
For i=0 to 10000

response.Write("@= " & i & "<br>")
if (i = 20) Then
Response.Write("script language=""Javascript""")
Response.Write("var objWin = window.open(""http://www.yahoo.com"",
""mywin"");")
Response.Write("objWin.focus();")
Response.Write("/script")
End If
response.Flush
If Not Response.IsClientConnected Then
response.End
End If
Next
end if
 

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,780
Messages
2,569,611
Members
45,269
Latest member
vinaykumar_nevatia23

Latest Threads

Top