Response.flush not displaying content

Discussion in 'ASP General' started by jose.mendez22@gmail.com, Dec 8, 2005.

  1. Guest

    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
    , Dec 8, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. William F. Robertson, Jr.

    Re: Response.Flush() does not work

    William F. Robertson, Jr., Aug 5, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    499
    William F. Robertson, Jr.
    Aug 5, 2003
  2. Glen Wilkin via DotNetMonster.com

    Response.Redirect after Response.Flush

    Glen Wilkin via DotNetMonster.com, Apr 15, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    6,885
  3. Replies:
    5
    Views:
    559
    =?ISO-8859-1?Q?G=F6ran_Andersson?=
    Jun 12, 2007
  4. alex

    response.flush not work

    alex, Sep 29, 2003, in forum: ASP General
    Replies:
    1
    Views:
    139
    Bob Barrows
    Sep 29, 2003
  5. Richard N.

    Response.Flush / Response.Redirect

    Richard N., Oct 18, 2003, in forum: ASP General
    Replies:
    1
    Views:
    188
    Tom B
    Oct 19, 2003
Loading...

Share This Page