Please wait ...message

Discussion in 'ASP General' started by dave, Mar 2, 2005.

  1. dave

    dave Guest

    Hi guys
    I display one page in popup window...that fetches some data from sql and
    perfom some calculation (tht approx 10 secs) and display result....
    I am trying to display "Please wait ..."message while its performing
    calculation...
    I'm using the below code...that i have got from following link
    http://aspfaq.com/show.asp?id=2498

    but somehow it doesnt work and displays nothing....it display only for a
    second before the actual result is displayed...

    Below is my code snippet:

    <%@LANGUAGE="VBSCRIPT"%>
    <!-- #include file="common/constants.asp"--> 'tht containts sql
    connection string
    <!-- #include file="common/database.asp"--> ' contains one class to
    perform to database and record set operation
    <% Response.Buffer = True %>
    <html>
    <head>
    <title>My Style - Plan Matrix</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <link rel="stylesheet" href="common/m8extranet.css" type="text/css">
    </head>
    <style>
    ..boxText {font-family:Arial; font-size:9pt; color:222222; font-weight:400;}
    </style>
    <body>
    <script>
    <!--
    if (document.all)
    {
    document.write("<span id=wxx>Please");
    document.write(" wait...</span>");
    }
    //-->
    </script>

    <% Response.Flush() %>

    <%
    sql = "Select * From Phoneprice Order by phprice"
    set rs = database.executequery(sql)
    sql = "Select * From Plancommi WHERE ptype='My Style' Order By planid"
    set rs1 = database.executequery(sql)
    %>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td><table width="100%" border="0" cellspacing="1" cellpadding="0">
    <tr>
    <td width="10%" class="header"><div
    align="right"><b>Plan</b></div></td>
    <td width="9%" class="header"><b>&nbsp;Matrix</b></td>
    <td width="9%" bgcolor="#CFF2FE" class="topMenubig"> <div
    align="center"><strong>My
    Style 16</strong></div></td>
    <td width="9%" bgcolor="#AEAEFF" class="topMenubig"> <div
    align="center"><strong>My
    Style 20</strong></div></td>
    <td width="9%" bgcolor="#FFD9D7" class="topMenubig"> <div
    align="center"><strong>My
    Style 30</strong></div></td>
    <td width="9%" bgcolor="#DBB7FF" class="topMenubig"> <div
    align="center"><strong>My
    Style 40</strong></div></td>
    <td width="9%" bgcolor="#FAE2AD" class="topMenubig"> <div
    align="center"><strong>My
    Style 50</strong></div></td>
    <td width="9%" bgcolor="#FECBFD" class="topMenubig"> <div
    align="center"><strong>My
    Style 70</strong></div></td>
    <td width="9%" bgcolor="#BBFFBB" class="topMenubig"> <div
    align="center"><strong>My
    Style 90</strong></div></td>
    <td width="9%" bgcolor="#BFDFFF" class="topMenubig"> <div
    align="center"><strong>My
    Style 150</strong></div></td>
    <td width="9%" bgcolor="#D3D3A9" class="topMenubig"> <div
    align="center"><strong>My
    Style 200</strong></div></td>
    </tr>
    <tr><td colspan="12">&nbsp;</td></tr>
    <%
    while not rs.eof
    Response.write "<tr>"
    Response.write "<td height=24 bgcolor=#DFDFDF align=center
    class=boxText>"&rs("phname")&"</td>"
    Response.write "<td bgcolor=#DFDFDF align=center
    class=boxText>"&rs("phmodel")&"</td>"
    'Response.write "<td bgcolor=#DFDFDF align=center
    class=boxText>"&FormatCurrency(rs("phprice"),2)&"</td>"
    rs1.movefirst
    cnt=1
    while not rs1.eof
    mystr = "tx_mar"&cnt
    tmpSql = "Select * From IMEIBonus WHERE Phid="&rs("phid")&" AND
    PlanId="&rs1("planid")
    'Response.write tmpSql
    'response.End()
    set rs_imei = database.executequery(tmpSql)
    If Not rs_imei.eof then
    IMEIBonus = rs_imei("Bonus")
    else
    IMEIBonus = 0
    End If
    myno = (rs1("commission") + IMEIBonus) -
    (rs("phprice")+Request.form(cstr(mystr)))
    If myno >= 0 Then
    Response.write "<td align=center bgcolor=#"&rs1("bgcol")&"
    class=boxText>Free</td>"
    Else
    myno = Abs(myno)
    Response.write "<td align=center bgcolor=#"&rs1("bgcol")&"
    class=boxText>"&FormatCurrency(myno,0)&"</td>"
    End If
    set rs_imei = Nothing
    rs1.movenext
    cnt = cnt + 1
    wend
    rs.movenext
    wend
    %>
    </table></td>
    </tr>
    </table>
    <%
    set rs= Nothing
    set rs1 = Nothing
    %>
    <script>
    <!--
    if (document.all)
    {
    document.all("wxx").style.display = 'none';
    }
    //-->
    </script>
    </body>
    </html>

    can any one help me??
    Thanx in advance
    dave
     
    dave, Mar 2, 2005
    #1
    1. Advertising

  2. (a) move the response.buffer line to BEFORE the <!--#include references.

    (b) STOP NESTING RECORDSETS! STOP USING SELECT *! Use <th> instead of
    <td..><strong> to reduce the weight of your HTML! Ugh, you will probably
    eliminate the need for a please wait message if you spend some time making
    this page more efficient. Please, please, please read
    http://www.aspfaq.com/2424




    On 3/1/05 10:13 PM, in article #v53$, "dave"
    <> wrote:

    > Hi guys
    > I display one page in popup window...that fetches some data from sql and
    > perfom some calculation (tht approx 10 secs) and display result....
    > I am trying to display "Please wait ..."message while its performing
    > calculation...
    > I'm using the below code...that i have got from following link
    > http://aspfaq.com/show.asp?id=2498
    >
    > but somehow it doesnt work and displays nothing....it display only for a
    > second before the actual result is displayed...
    >
    > Below is my code snippet:
    >
    > <%@LANGUAGE="VBSCRIPT"%>
    > <!-- #include file="common/constants.asp"--> 'tht containts sql
    > connection string
    > <!-- #include file="common/database.asp"--> ' contains one class to
    > perform to database and record set operation
    > <% Response.Buffer = True %>
    > <html>
    > <head>
    > <title>My Style - Plan Matrix</title>
    > <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    > <link rel="stylesheet" href="common/m8extranet.css" type="text/css">
    > </head>
    > <style>
    > .boxText {font-family:Arial; font-size:9pt; color:222222; font-weight:400;}
    >
    > </style>
    > <body>
    > <script>
    > <!--
    > if (document.all)
    > {
    > document.write("<span id=wxx>Please");
    > document.write(" wait...</span>");
    > }
    > //-->
    > </script>
    >
    > <% Response.Flush() %>
    >
    > <%
    > sql = "Select * From Phoneprice Order by phprice"
    > set rs = database.executequery(sql)
    > sql = "Select * From Plancommi WHERE ptype='My Style' Order By planid"
    > set rs1 = database.executequery(sql)
    > %>
    > <table width="100%" border="0" cellspacing="0" cellpadding="0">
    > <tr>
    > <td><table width="100%" border="0" cellspacing="1" cellpadding="0">
    > <tr>
    > <td width="10%" class="header"><div
    > align="right"><b>Plan</b></div></td>
    > <td width="9%" class="header"><b>&nbsp;Matrix</b></td>
    > <td width="9%" bgcolor="#CFF2FE" class="topMenubig"> <div
    > align="center"><strong>My
    > Style 16</strong></div></td>
    > <td width="9%" bgcolor="#AEAEFF" class="topMenubig"> <div
    > align="center"><strong>My
    > Style 20</strong></div></td>
    > <td width="9%" bgcolor="#FFD9D7" class="topMenubig"> <div
    > align="center"><strong>My
    > Style 30</strong></div></td>
    > <td width="9%" bgcolor="#DBB7FF" class="topMenubig"> <div
    > align="center"><strong>My
    > Style 40</strong></div></td>
    > <td width="9%" bgcolor="#FAE2AD" class="topMenubig"> <div
    > align="center"><strong>My
    > Style 50</strong></div></td>
    > <td width="9%" bgcolor="#FECBFD" class="topMenubig"> <div
    > align="center"><strong>My
    > Style 70</strong></div></td>
    > <td width="9%" bgcolor="#BBFFBB" class="topMenubig"> <div
    > align="center"><strong>My
    > Style 90</strong></div></td>
    > <td width="9%" bgcolor="#BFDFFF" class="topMenubig"> <div
    > align="center"><strong>My
    > Style 150</strong></div></td>
    > <td width="9%" bgcolor="#D3D3A9" class="topMenubig"> <div
    > align="center"><strong>My
    > Style 200</strong></div></td>
    > </tr>
    > <tr><td colspan="12">&nbsp;</td></tr>
    > <%
    > while not rs.eof
    > Response.write "<tr>"
    > Response.write "<td height=24 bgcolor=#DFDFDF align=center
    > class=boxText>"&rs("phname")&"</td>"
    > Response.write "<td bgcolor=#DFDFDF align=center
    > class=boxText>"&rs("phmodel")&"</td>"
    > 'Response.write "<td bgcolor=#DFDFDF align=center
    > class=boxText>"&FormatCurrency(rs("phprice"),2)&"</td>"
    > rs1.movefirst
    > cnt=1
    > while not rs1.eof
    > mystr = "tx_mar"&cnt
    > tmpSql = "Select * From IMEIBonus WHERE Phid="&rs("phid")&" AND
    > PlanId="&rs1("planid")
    > 'Response.write tmpSql
    > 'response.End()
    > set rs_imei = database.executequery(tmpSql)
    > If Not rs_imei.eof then
    > IMEIBonus = rs_imei("Bonus")
    > else
    > IMEIBonus = 0
    > End If
    > myno = (rs1("commission") + IMEIBonus) -
    > (rs("phprice")+Request.form(cstr(mystr)))
    > If myno >= 0 Then
    > Response.write "<td align=center bgcolor=#"&rs1("bgcol")&"
    > class=boxText>Free</td>"
    > Else
    > myno = Abs(myno)
    > Response.write "<td align=center bgcolor=#"&rs1("bgcol")&"
    > class=boxText>"&FormatCurrency(myno,0)&"</td>"
    > End If
    > set rs_imei = Nothing
    > rs1.movenext
    > cnt = cnt + 1
    > wend
    > rs.movenext
    > wend
    > %>
    > </table></td>
    > </tr>
    > </table>
    > <%
    > set rs= Nothing
    > set rs1 = Nothing
    > %>
    > <script>
    > <!--
    > if (document.all)
    > {
    > document.all("wxx").style.display = 'none';
    > }
    > //-->
    > </script>
    > </body>
    > </html>
    >
    > can any one help me??
    > Thanx in advance
    > dave
    >
    >
     
    Aaron [SQL Server MVP], Mar 2, 2005
    #2
    1. Advertising

  3. dave

    dave Guest

    thanx for prompt reply
    now it works on localhost but funny thing when i upload to web server..it
    doesnt work...
    couldnt figure out whts going on
    dave

    "Aaron [SQL Server MVP]" <> wrote in message
    news:BE4AA9ED.1ACD%...
    > (a) move the response.buffer line to BEFORE the <!--#include references.
    >
    > (b) STOP NESTING RECORDSETS! STOP USING SELECT *! Use <th> instead of
    > <td..><strong> to reduce the weight of your HTML! Ugh, you will probably
    > eliminate the need for a please wait message if you spend some time making
    > this page more efficient. Please, please, please read
    > http://www.aspfaq.com/2424
    >
    >
    >
    >
    > On 3/1/05 10:13 PM, in article #v53$,

    "dave"
    > <> wrote:
    >
    > > Hi guys
    > > I display one page in popup window...that fetches some data from sql and
    > > perfom some calculation (tht approx 10 secs) and display result....
    > > I am trying to display "Please wait ..."message while its performing
    > > calculation...
    > > I'm using the below code...that i have got from following link
    > > http://aspfaq.com/show.asp?id=2498
    > >
    > > but somehow it doesnt work and displays nothing....it display only for a
    > > second before the actual result is displayed...
    > >
    > > Below is my code snippet:
    > >
    > > <%@LANGUAGE="VBSCRIPT"%>
    > > <!-- #include file="common/constants.asp"--> 'tht containts sql
    > > connection string
    > > <!-- #include file="common/database.asp"--> ' contains one class to
    > > perform to database and record set operation
    > > <% Response.Buffer = True %>
    > > <html>
    > > <head>
    > > <title>My Style - Plan Matrix</title>
    > > <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    > > <link rel="stylesheet" href="common/m8extranet.css" type="text/css">
    > > </head>
    > > <style>
    > > .boxText {font-family:Arial; font-size:9pt; color:222222;

    font-weight:400;}
    > >
    > > </style>
    > > <body>
    > > <script>
    > > <!--
    > > if (document.all)
    > > {
    > > document.write("<span id=wxx>Please");
    > > document.write(" wait...</span>");
    > > }
    > > //-->
    > > </script>
    > >
    > > <% Response.Flush() %>
    > >
    > > <%
    > > sql = "Select * From Phoneprice Order by phprice"
    > > set rs = database.executequery(sql)
    > > sql = "Select * From Plancommi WHERE ptype='My Style' Order By planid"
    > > set rs1 = database.executequery(sql)
    > > %>
    > > <table width="100%" border="0" cellspacing="0" cellpadding="0">
    > > <tr>
    > > <td><table width="100%" border="0" cellspacing="1" cellpadding="0">
    > > <tr>
    > > <td width="10%" class="header"><div
    > > align="right"><b>Plan</b></div></td>
    > > <td width="9%" class="header"><b>&nbsp;Matrix</b></td>
    > > <td width="9%" bgcolor="#CFF2FE" class="topMenubig"> <div
    > > align="center"><strong>My
    > > Style 16</strong></div></td>
    > > <td width="9%" bgcolor="#AEAEFF" class="topMenubig"> <div
    > > align="center"><strong>My
    > > Style 20</strong></div></td>
    > > <td width="9%" bgcolor="#FFD9D7" class="topMenubig"> <div
    > > align="center"><strong>My
    > > Style 30</strong></div></td>
    > > <td width="9%" bgcolor="#DBB7FF" class="topMenubig"> <div
    > > align="center"><strong>My
    > > Style 40</strong></div></td>
    > > <td width="9%" bgcolor="#FAE2AD" class="topMenubig"> <div
    > > align="center"><strong>My
    > > Style 50</strong></div></td>
    > > <td width="9%" bgcolor="#FECBFD" class="topMenubig"> <div
    > > align="center"><strong>My
    > > Style 70</strong></div></td>
    > > <td width="9%" bgcolor="#BBFFBB" class="topMenubig"> <div
    > > align="center"><strong>My
    > > Style 90</strong></div></td>
    > > <td width="9%" bgcolor="#BFDFFF" class="topMenubig"> <div
    > > align="center"><strong>My
    > > Style 150</strong></div></td>
    > > <td width="9%" bgcolor="#D3D3A9" class="topMenubig"> <div
    > > align="center"><strong>My
    > > Style 200</strong></div></td>
    > > </tr>
    > > <tr><td colspan="12">&nbsp;</td></tr>
    > > <%
    > > while not rs.eof
    > > Response.write "<tr>"
    > > Response.write "<td height=24 bgcolor=#DFDFDF align=center
    > > class=boxText>"&rs("phname")&"</td>"
    > > Response.write "<td bgcolor=#DFDFDF align=center
    > > class=boxText>"&rs("phmodel")&"</td>"
    > > 'Response.write "<td bgcolor=#DFDFDF align=center
    > > class=boxText>"&FormatCurrency(rs("phprice"),2)&"</td>"
    > > rs1.movefirst
    > > cnt=1
    > > while not rs1.eof
    > > mystr = "tx_mar"&cnt
    > > tmpSql = "Select * From IMEIBonus WHERE Phid="&rs("phid")&" AND
    > > PlanId="&rs1("planid")
    > > 'Response.write tmpSql
    > > 'response.End()
    > > set rs_imei = database.executequery(tmpSql)
    > > If Not rs_imei.eof then
    > > IMEIBonus = rs_imei("Bonus")
    > > else
    > > IMEIBonus = 0
    > > End If
    > > myno = (rs1("commission") + IMEIBonus) -
    > > (rs("phprice")+Request.form(cstr(mystr)))
    > > If myno >= 0 Then
    > > Response.write "<td align=center bgcolor=#"&rs1("bgcol")&"
    > > class=boxText>Free</td>"
    > > Else
    > > myno = Abs(myno)
    > > Response.write "<td align=center bgcolor=#"&rs1("bgcol")&"
    > > class=boxText>"&FormatCurrency(myno,0)&"</td>"
    > > End If
    > > set rs_imei = Nothing
    > > rs1.movenext
    > > cnt = cnt + 1
    > > wend
    > > rs.movenext
    > > wend
    > > %>
    > > </table></td>
    > > </tr>
    > > </table>
    > > <%
    > > set rs= Nothing
    > > set rs1 = Nothing
    > > %>
    > > <script>
    > > <!--
    > > if (document.all)
    > > {
    > > document.all("wxx").style.display = 'none';
    > > }
    > > //-->
    > > </script>
    > > </body>
    > > </html>
    > >
    > > can any one help me??
    > > Thanx in advance
    > > dave
    > >
    > >

    >
     
    dave, Mar 2, 2005
    #3
  4. Could be buffering is enabled in one place and disabled in the other. Could
    be that your include files are different in the two places, and the ones
    where it DOESN'T work set response.buffer = false (a stretch, I know, but
    possible).

    Tough to tell without being able to show us both environments.


    On 3/1/05 11:48 PM, in article , "dave"
    <> wrote:

    > thanx for prompt reply
    > now it works on localhost but funny thing when i upload to web server..it
    > doesnt work...
    > couldnt figure out whts going on
    > dave
    >
    > "Aaron [SQL Server MVP]" <> wrote in message
    > news:BE4AA9ED.1ACD%...
    >> (a) move the response.buffer line to BEFORE the <!--#include references.
    >>
    >> (b) STOP NESTING RECORDSETS! STOP USING SELECT *! Use <th> instead of
    >> <td..><strong> to reduce the weight of your HTML! Ugh, you will probably
    >> eliminate the need for a please wait message if you spend some time making
    >> this page more efficient. Please, please, please read
    >> http://www.aspfaq.com/2424
    >>
    >>
    >>
    >>
    >> On 3/1/05 10:13 PM, in article #v53$,

    > "dave"
    >> <> wrote:
    >>
    >>> Hi guys
    >>> I display one page in popup window...that fetches some data from sql and
    >>> perfom some calculation (tht approx 10 secs) and display result....
    >>> I am trying to display "Please wait ..."message while its performing
    >>> calculation...
    >>> I'm using the below code...that i have got from following link
    >>> http://aspfaq.com/show.asp?id=2498
    >>>
    >>> but somehow it doesnt work and displays nothing....it display only for a
    >>> second before the actual result is displayed...
    >>>
    >>> Below is my code snippet:
    >>>
    >>> <%@LANGUAGE="VBSCRIPT"%>
    >>> <!-- #include file="common/constants.asp"--> 'tht containts sql
    >>> connection string
    >>> <!-- #include file="common/database.asp"--> ' contains one class to
    >>> perform to database and record set operation
    >>> <% Response.Buffer = True %>
    >>> <html>
    >>> <head>
    >>> <title>My Style - Plan Matrix</title>
    >>> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    >>> <link rel="stylesheet" href="common/m8extranet.css" type="text/css">
    >>> </head>
    >>> <style>
    >>> .boxText {font-family:Arial; font-size:9pt; color:222222;

    > font-weight:400;}
    >>>
    >>> </style>
    >>> <body>
    >>> <script>
    >>> <!--
    >>> if (document.all)
    >>> {
    >>> document.write("<span id=wxx>Please");
    >>> document.write(" wait...</span>");
    >>> }
    >>> //-->
    >>> </script>
    >>>
    >>> <% Response.Flush() %>
    >>>
    >>> <%
    >>> sql = "Select * From Phoneprice Order by phprice"
    >>> set rs = database.executequery(sql)
    >>> sql = "Select * From Plancommi WHERE ptype='My Style' Order By planid"
    >>> set rs1 = database.executequery(sql)
    >>> %>
    >>> <table width="100%" border="0" cellspacing="0" cellpadding="0">
    >>> <tr>
    >>> <td><table width="100%" border="0" cellspacing="1" cellpadding="0">
    >>> <tr>
    >>> <td width="10%" class="header"><div
    >>> align="right"><b>Plan</b></div></td>
    >>> <td width="9%" class="header"><b>&nbsp;Matrix</b></td>
    >>> <td width="9%" bgcolor="#CFF2FE" class="topMenubig"> <div
    >>> align="center"><strong>My
    >>> Style 16</strong></div></td>
    >>> <td width="9%" bgcolor="#AEAEFF" class="topMenubig"> <div
    >>> align="center"><strong>My
    >>> Style 20</strong></div></td>
    >>> <td width="9%" bgcolor="#FFD9D7" class="topMenubig"> <div
    >>> align="center"><strong>My
    >>> Style 30</strong></div></td>
    >>> <td width="9%" bgcolor="#DBB7FF" class="topMenubig"> <div
    >>> align="center"><strong>My
    >>> Style 40</strong></div></td>
    >>> <td width="9%" bgcolor="#FAE2AD" class="topMenubig"> <div
    >>> align="center"><strong>My
    >>> Style 50</strong></div></td>
    >>> <td width="9%" bgcolor="#FECBFD" class="topMenubig"> <div
    >>> align="center"><strong>My
    >>> Style 70</strong></div></td>
    >>> <td width="9%" bgcolor="#BBFFBB" class="topMenubig"> <div
    >>> align="center"><strong>My
    >>> Style 90</strong></div></td>
    >>> <td width="9%" bgcolor="#BFDFFF" class="topMenubig"> <div
    >>> align="center"><strong>My
    >>> Style 150</strong></div></td>
    >>> <td width="9%" bgcolor="#D3D3A9" class="topMenubig"> <div
    >>> align="center"><strong>My
    >>> Style 200</strong></div></td>
    >>> </tr>
    >>> <tr><td colspan="12">&nbsp;</td></tr>
    >>> <%
    >>> while not rs.eof
    >>> Response.write "<tr>"
    >>> Response.write "<td height=24 bgcolor=#DFDFDF align=center
    >>> class=boxText>"&rs("phname")&"</td>"
    >>> Response.write "<td bgcolor=#DFDFDF align=center
    >>> class=boxText>"&rs("phmodel")&"</td>"
    >>> 'Response.write "<td bgcolor=#DFDFDF align=center
    >>> class=boxText>"&FormatCurrency(rs("phprice"),2)&"</td>"
    >>> rs1.movefirst
    >>> cnt=1
    >>> while not rs1.eof
    >>> mystr = "tx_mar"&cnt
    >>> tmpSql = "Select * From IMEIBonus WHERE Phid="&rs("phid")&" AND
    >>> PlanId="&rs1("planid")
    >>> 'Response.write tmpSql
    >>> 'response.End()
    >>> set rs_imei = database.executequery(tmpSql)
    >>> If Not rs_imei.eof then
    >>> IMEIBonus = rs_imei("Bonus")
    >>> else
    >>> IMEIBonus = 0
    >>> End If
    >>> myno = (rs1("commission") + IMEIBonus) -
    >>> (rs("phprice")+Request.form(cstr(mystr)))
    >>> If myno >= 0 Then
    >>> Response.write "<td align=center bgcolor=#"&rs1("bgcol")&"
    >>> class=boxText>Free</td>"
    >>> Else
    >>> myno = Abs(myno)
    >>> Response.write "<td align=center bgcolor=#"&rs1("bgcol")&"
    >>> class=boxText>"&FormatCurrency(myno,0)&"</td>"
    >>> End If
    >>> set rs_imei = Nothing
    >>> rs1.movenext
    >>> cnt = cnt + 1
    >>> wend
    >>> rs.movenext
    >>> wend
    >>> %>
    >>> </table></td>
    >>> </tr>
    >>> </table>
    >>> <%
    >>> set rs= Nothing
    >>> set rs1 = Nothing
    >>> %>
    >>> <script>
    >>> <!--
    >>> if (document.all)
    >>> {
    >>> document.all("wxx").style.display = 'none';
    >>> }
    >>> //-->
    >>> </script>
    >>> </body>
    >>> </html>
    >>>
    >>> can any one help me??
    >>> Thanx in advance
    >>> dave
    >>>
    >>>

    >>

    >
    >
     
    Aaron [SQL Server MVP], Mar 2, 2005
    #4
  5. dave

    dave Guest

    I copied two files which i was using in include statement just to make sure
    both side same code..
    also tried with response.buffer = false..but got error msg saying
    buffer must be on
    dave

    "Aaron [SQL Server MVP]" <> wrote in message
    news:BE4AB299.1ADE%...
    > Could be buffering is enabled in one place and disabled in the other.

    Could
    > be that your include files are different in the two places, and the ones
    > where it DOESN'T work set response.buffer = false (a stretch, I know, but
    > possible).
    >
    > Tough to tell without being able to show us both environments.
    >
    >
    > On 3/1/05 11:48 PM, in article ,

    "dave"
    > <> wrote:
    >
    > > thanx for prompt reply
    > > now it works on localhost but funny thing when i upload to web

    server..it
    > > doesnt work...
    > > couldnt figure out whts going on
    > > dave
    > >
    > > "Aaron [SQL Server MVP]" <> wrote in message
    > > news:BE4AA9ED.1ACD%...
    > >> (a) move the response.buffer line to BEFORE the <!--#include

    references.
    > >>
    > >> (b) STOP NESTING RECORDSETS! STOP USING SELECT *! Use <th> instead of
    > >> <td..><strong> to reduce the weight of your HTML! Ugh, you will

    probably
    > >> eliminate the need for a please wait message if you spend some time

    making
    > >> this page more efficient. Please, please, please read
    > >> http://www.aspfaq.com/2424
    > >>
    > >>
    > >>
    > >>
    > >> On 3/1/05 10:13 PM, in article #v53$,

    > > "dave"
    > >> <> wrote:
    > >>
    > >>> Hi guys
    > >>> I display one page in popup window...that fetches some data from sql

    and
    > >>> perfom some calculation (tht approx 10 secs) and display result....
    > >>> I am trying to display "Please wait ..."message while its performing
    > >>> calculation...
    > >>> I'm using the below code...that i have got from following link
    > >>> http://aspfaq.com/show.asp?id=2498
    > >>>
    > >>> but somehow it doesnt work and displays nothing....it display only for

    a
    > >>> second before the actual result is displayed...
    > >>>
    > >>> Below is my code snippet:
    > >>>
    > >>> <%@LANGUAGE="VBSCRIPT"%>
    > >>> <!-- #include file="common/constants.asp"--> 'tht containts sql
    > >>> connection string
    > >>> <!-- #include file="common/database.asp"--> ' contains one class to
    > >>> perform to database and record set operation
    > >>> <% Response.Buffer = True %>
    > >>> <html>
    > >>> <head>
    > >>> <title>My Style - Plan Matrix</title>
    > >>> <meta http-equiv="Content-Type" content="text/html;

    charset=iso-8859-1">
    > >>> <link rel="stylesheet" href="common/m8extranet.css" type="text/css">
    > >>> </head>
    > >>> <style>
    > >>> .boxText {font-family:Arial; font-size:9pt; color:222222;

    > > font-weight:400;}
    > >>>
    > >>> </style>
    > >>> <body>
    > >>> <script>
    > >>> <!--
    > >>> if (document.all)
    > >>> {
    > >>> document.write("<span id=wxx>Please");
    > >>> document.write(" wait...</span>");
    > >>> }
    > >>> //-->
    > >>> </script>
    > >>>
    > >>> <% Response.Flush() %>
    > >>>
    > >>> <%
    > >>> sql = "Select * From Phoneprice Order by phprice"
    > >>> set rs = database.executequery(sql)
    > >>> sql = "Select * From Plancommi WHERE ptype='My Style' Order By planid"
    > >>> set rs1 = database.executequery(sql)
    > >>> %>
    > >>> <table width="100%" border="0" cellspacing="0" cellpadding="0">
    > >>> <tr>
    > >>> <td><table width="100%" border="0" cellspacing="1"

    cellpadding="0">
    > >>> <tr>
    > >>> <td width="10%" class="header"><div
    > >>> align="right"><b>Plan</b></div></td>
    > >>> <td width="9%" class="header"><b>&nbsp;Matrix</b></td>
    > >>> <td width="9%" bgcolor="#CFF2FE" class="topMenubig"> <div
    > >>> align="center"><strong>My
    > >>> Style 16</strong></div></td>
    > >>> <td width="9%" bgcolor="#AEAEFF" class="topMenubig"> <div
    > >>> align="center"><strong>My
    > >>> Style 20</strong></div></td>
    > >>> <td width="9%" bgcolor="#FFD9D7" class="topMenubig"> <div
    > >>> align="center"><strong>My
    > >>> Style 30</strong></div></td>
    > >>> <td width="9%" bgcolor="#DBB7FF" class="topMenubig"> <div
    > >>> align="center"><strong>My
    > >>> Style 40</strong></div></td>
    > >>> <td width="9%" bgcolor="#FAE2AD" class="topMenubig"> <div
    > >>> align="center"><strong>My
    > >>> Style 50</strong></div></td>
    > >>> <td width="9%" bgcolor="#FECBFD" class="topMenubig"> <div
    > >>> align="center"><strong>My
    > >>> Style 70</strong></div></td>
    > >>> <td width="9%" bgcolor="#BBFFBB" class="topMenubig"> <div
    > >>> align="center"><strong>My
    > >>> Style 90</strong></div></td>
    > >>> <td width="9%" bgcolor="#BFDFFF" class="topMenubig"> <div
    > >>> align="center"><strong>My
    > >>> Style 150</strong></div></td>
    > >>> <td width="9%" bgcolor="#D3D3A9" class="topMenubig"> <div
    > >>> align="center"><strong>My
    > >>> Style 200</strong></div></td>
    > >>> </tr>
    > >>> <tr><td colspan="12">&nbsp;</td></tr>
    > >>> <%
    > >>> while not rs.eof
    > >>> Response.write "<tr>"
    > >>> Response.write "<td height=24 bgcolor=#DFDFDF align=center
    > >>> class=boxText>"&rs("phname")&"</td>"
    > >>> Response.write "<td bgcolor=#DFDFDF align=center
    > >>> class=boxText>"&rs("phmodel")&"</td>"
    > >>> 'Response.write "<td bgcolor=#DFDFDF align=center
    > >>> class=boxText>"&FormatCurrency(rs("phprice"),2)&"</td>"
    > >>> rs1.movefirst
    > >>> cnt=1
    > >>> while not rs1.eof
    > >>> mystr = "tx_mar"&cnt
    > >>> tmpSql = "Select * From IMEIBonus WHERE Phid="&rs("phid")&" AND
    > >>> PlanId="&rs1("planid")
    > >>> 'Response.write tmpSql
    > >>> 'response.End()
    > >>> set rs_imei = database.executequery(tmpSql)
    > >>> If Not rs_imei.eof then
    > >>> IMEIBonus = rs_imei("Bonus")
    > >>> else
    > >>> IMEIBonus = 0
    > >>> End If
    > >>> myno = (rs1("commission") + IMEIBonus) -
    > >>> (rs("phprice")+Request.form(cstr(mystr)))
    > >>> If myno >= 0 Then
    > >>> Response.write "<td align=center bgcolor=#"&rs1("bgcol")&"
    > >>> class=boxText>Free</td>"
    > >>> Else
    > >>> myno = Abs(myno)
    > >>> Response.write "<td align=center bgcolor=#"&rs1("bgcol")&"
    > >>> class=boxText>"&FormatCurrency(myno,0)&"</td>"
    > >>> End If
    > >>> set rs_imei = Nothing
    > >>> rs1.movenext
    > >>> cnt = cnt + 1
    > >>> wend
    > >>> rs.movenext
    > >>> wend
    > >>> %>
    > >>> </table></td>
    > >>> </tr>
    > >>> </table>
    > >>> <%
    > >>> set rs= Nothing
    > >>> set rs1 = Nothing
    > >>> %>
    > >>> <script>
    > >>> <!--
    > >>> if (document.all)
    > >>> {
    > >>> document.all("wxx").style.display = 'none';
    > >>> }
    > >>> //-->
    > >>> </script>
    > >>> </body>
    > >>> </html>
    > >>>
    > >>> can any one help me??
    > >>> Thanx in advance
    > >>> dave
    > >>>
    > >>>
    > >>

    > >
    > >

    >
     
    dave, Mar 2, 2005
    #5
    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. Craig Deelsnyder

    Re: best way to do a "please wait" message

    Craig Deelsnyder, Aug 3, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    816
  2. A.M

    Please Wait ... message

    A.M, May 11, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    510
  3. Replies:
    2
    Views:
    584
  4. =?Utf-8?B?UG9udGlNYXg=?=

    Long-running task: Show DIV with 'Please wait' message

    =?Utf-8?B?UG9udGlNYXg=?=, Feb 10, 2005, in forum: ASP .Net
    Replies:
    5
    Views:
    4,484
    =?Utf-8?B?ZmFsY29u?=
    Feb 11, 2005
  5. =?Utf-8?B?Sm9obiBXYWxrZXI=?=

    PostBack "Please Wait..." Message.

    =?Utf-8?B?Sm9obiBXYWxrZXI=?=, Jun 15, 2005, in forum: ASP .Net
    Replies:
    9
    Views:
    1,081
    Daniel Walzenbach
    Jun 17, 2005
Loading...

Share This Page