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="VB SCRIPT"%>
<!-- #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.execut equery(sql)
sql = "Select * From Plancommi WHERE ptype='My Style' Order By planid"
set rs1 = database.execut equery(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> Matrix </b></td>
<td width="9%" bgcolor="#CFF2F E" class="topMenub ig"> <div
align="center"> <strong>My
Style 16</strong></div></td>
<td width="9%" bgcolor="#AEAEF F" class="topMenub ig"> <div
align="center"> <strong>My
Style 20</strong></div></td>
<td width="9%" bgcolor="#FFD9D 7" class="topMenub ig"> <div
align="center"> <strong>My
Style 30</strong></div></td>
<td width="9%" bgcolor="#DBB7F F" class="topMenub ig"> <div
align="center"> <strong>My
Style 40</strong></div></td>
<td width="9%" bgcolor="#FAE2A D" class="topMenub ig"> <div
align="center"> <strong>My
Style 50</strong></div></td>
<td width="9%" bgcolor="#FECBF D" class="topMenub ig"> <div
align="center"> <strong>My
Style 70</strong></div></td>
<td width="9%" bgcolor="#BBFFB B" class="topMenub ig"> <div
align="center"> <strong>My
Style 90</strong></div></td>
<td width="9%" bgcolor="#BFDFF F" class="topMenub ig"> <div
align="center"> <strong>My
Style 150</strong></div></td>
<td width="9%" bgcolor="#D3D3A 9" class="topMenub ig"> <div
align="center"> <strong>My
Style 200</strong></div></td>
</tr>
<tr><td colspan="12">&n bsp;</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"&cn t
tmpSql = "Select * From IMEIBonus WHERE Phid="&rs("phid ")&" AND
PlanId="&rs1("p lanid")
'Response.write tmpSql
'response.End()
set rs_imei = database.execut equery(tmpSql)
If Not rs_imei.eof then
IMEIBonus = rs_imei("Bonus" )
else
IMEIBonus = 0
End If
myno = (rs1("commissio n") + IMEIBonus) -
(rs("phprice")+ Request.form(cs tr(mystr)))
If myno >= 0 Then
Response.write "<td align=center bgcolor=#"&rs1( "bgcol")&"
class=boxText>F ree</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("w xx").style.disp lay = 'none';
}
//-->
</script>
</body>
</html>
can any one help me??
Thanx in advance
dave