WoG
12-13-2004, 07:49 PM
I really don't know where else to put this, so I apologize if it's in the wrong forum. The problem is, I have a webpage that is posting a number into my page, without me calling for it to be posted.
Here is an image:
http://www.missioncontrol-lgc.com/images/weird.jpg
Here is the original code (some data removed):
**************************************************************
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?xml veresultion="1.0" encoding="iso-8859-1"?>
<%@LANGUAGE="VBSCRIPT" %>
<%
'this must appear before the includes below
'but the doctype must be on the 'firesultt line' for IE
Response.Expires = -1000
pageName = "rpt"
%>
<!-- #include virtual="includes/adovbs.asp" -->
<%
'create and open the connection with the database
Set cn = Server.CreateObject("ADODB.Connection")
cn.ConnectionString = "details...blah"
cn.Open
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>BU Snapshot Report beta(v.5)</title>
<link rel="stylesheet" type="text/css" media="screen" href="style/report.css" />
<link rel="stylesheet" type="text/css" media="print" href="style/print.css" />
<meta http-equiv="Content-Type" content="text/html; charesultet=iso-8859-1" />
</head>
<body>
...
<div>
<table>
<tr>
<td valign="top" style="width:420px">
HERE-> <!-- #include file="includes/FR_app.inc" -->
</td>
<td valign="top">
HERE-> <!-- #include file="includes/FR_adm.inc" -->
</td>
<td valign="top">
HERE-> <!-- #include file="includes/FR_enr.inc" -->
</td>
</tr>
</table>
</div>
<%
cn.close
%>
</body>
</html>
******************************************************
Where it says: HERE-> is where the server is inserting the numbers. When I try to print out the source after the page has been rendered, here is what I get:
******************************************************
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?xml veresultion="1.0" encoding="iso-8859-1"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>BU Snapshot Report beta(v.5)</title>
<link rel="stylesheet" type="text/css" media="screen" href="style/report.css" />
<link rel="stylesheet" type="text/css" media="print" href="style/print.css" />
<meta http-equiv="Content-Type" content="text/html; charesultet=iso-8859-1" />
</head>
<body>
<div>
<!-- Freshman -->
<table>
<tr>
<td valign="top" style="width:420px">
HERE-> 12218585343499
<!-- ####################################### HTML ##########################################-->
<div class="college">
<table>
<tr class="rowa">
<td class="lcell">LAS</td>
<td class="dcell">1421</td>
<td class="dcell">1299</td>
<td class="ccell">122</td>
<td class="dcell">9.39%</td>
</tr>
</tr>
</table>
<td valign="top">
HERE-> -647-7-40-40-233-47-6
<!-- ####################################### HTML ##########################################-->
<div class="college">
<table>
<tr class="rowa">
<td class="dcell">635</td>
<td class="dcell">647</td>
<td class="ccell">-647</td>
<td class="dcell">-100.00%</td>
</tr>
<tr class="rowb">
<td class="dcell">116</td>
<td class="dcell">123</td>
<td class="ccell">-7</td>
<td class="dcell">-5.69%</td>
</tr>
</table>
</div>
<td valign="top">
HERE-> 1351414883
<!-- ####################################### HTML ##########################################-->
<div class="college">
<table>
<tr class="rowa">
<td class="dcell">15</td>
<td class="dcell">2</td>
<td class="ccell">13</td>
<td class="dcell">650.00%</td>
</tr>
<tr class="rowb">
<td class="dcell">5</td>
<td class="dcell">0</td>
<td class="ccell">5</td>
<td class="dcell">No Data</td>
</tr>
</table>
</div>
</body>
</html>
***********************************************
This time where the "HERE->" is shows this number. I am including 3 files that run a query when opened, set some variables, and do some calculations on them before inserting them into the table. There are no Response.Write() functions, or any display functions until I get to the HTML tables at the bottom:(snippet)
************************************************
<%
sql_fr_app_curr_base = "SELECT COUNT(*) FROM rpt_daily_temp_curr WHERE ((StatusCluster = 'Applicant') OR (StatusCluster = 'Admit') OR (StatusCluster = 'Enrolled')) AND (EntryTermCluster LIKE '___Fall') AND ((Class_Num = 2) OR (Class_Num = 6))"
sql_fr_app_prev_base = "SELECT COUNT(*) FROM rpt_daily_temp_prev WHERE ((StatusCluster = 'Applicant') OR (StatusCluster = 'Admit') OR (StatusCluster = 'Enrolled')) AND (EntryTermCluster LIKE '___Fall') AND ((Class_Num = 2) OR (Class_Num = 6))"
sqlLAScurr = sql_fr_app_curr_base & " AND (MajorCat_Num = 8)"
SET rs = cn.execute(sqlLAScurr)
LAScurr = rs(0)
sqlLASprev = sql_fr_app_prev_base & " AND (MajorCat_Num = 8)"
SET rs = cn.execute(sqlLASprev)
LASprev = rs(0)
...
....
'###################################################################
IF (COEcurr = "NULL" OR COEprev= "NULL") THEN
COE_diff = "No Data"
ELSE
COE_diff = CInt(COEcurr) - CInt(COEprev)
Response.Write(COE_diff)
END IF
IF (COEprev = "NULL" OR COEprev = 0) THEN
COE_diff_perc = "No Data"
ELSE
COE_diff_perc = formatpercent((CInt(COE_diff)/CInt(COEprev)), 2)
END IF
'###################################################################
'CBA
IF (CBAcurr = "NULL" OR CBAprev= "NULL") THEN
CBA_diff = "No Data"
ELSE
CBA_diff = CInt(CBAcurr) - CInt(CBAprev)
Response.Write(CBA_diff)
END IF
IF (CBAprev = "NULL" OR CBAprev = 0) THEN
CBA_diff_perc = "No Data"
ELSE
CBA_diff_perc = formatpercent((CInt(CBA_diff)/CInt(CBAprev)), 2)
END IF
..
...
%>
<!-- ####################################### HTML ##########################################-->
<div class="college">
<table>
<tr class="rowa">
<td class="lcell">LAS</td>
<td class="dcell"><%= LAScurr %></td>
<td class="dcell"><%= LASprev %></td>
<td class="ccell"><%= LAS_diff %></td>
<td class="dcell"><%= LAS_diff_perc %></td>
</tr>
<tr class="rowb">
<td class="lcell">COE</td>
<td class="dcell"><%= COEcurr %></td>
<td class="dcell"><%= COEprev %></td>
<td class="ccell"><%= COE_diff %></td>
<td class="dcell"><%= COE_diff_perc %></td>
</tr>
...
...
</table>
</div>
************************************************************
Could it be the SQL? What would insert these numbers?
Thanks, and sorry if this is completely out of left field...
WoG
Here is an image:
http://www.missioncontrol-lgc.com/images/weird.jpg
Here is the original code (some data removed):
**************************************************************
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?xml veresultion="1.0" encoding="iso-8859-1"?>
<%@LANGUAGE="VBSCRIPT" %>
<%
'this must appear before the includes below
'but the doctype must be on the 'firesultt line' for IE
Response.Expires = -1000
pageName = "rpt"
%>
<!-- #include virtual="includes/adovbs.asp" -->
<%
'create and open the connection with the database
Set cn = Server.CreateObject("ADODB.Connection")
cn.ConnectionString = "details...blah"
cn.Open
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>BU Snapshot Report beta(v.5)</title>
<link rel="stylesheet" type="text/css" media="screen" href="style/report.css" />
<link rel="stylesheet" type="text/css" media="print" href="style/print.css" />
<meta http-equiv="Content-Type" content="text/html; charesultet=iso-8859-1" />
</head>
<body>
...
<div>
<table>
<tr>
<td valign="top" style="width:420px">
HERE-> <!-- #include file="includes/FR_app.inc" -->
</td>
<td valign="top">
HERE-> <!-- #include file="includes/FR_adm.inc" -->
</td>
<td valign="top">
HERE-> <!-- #include file="includes/FR_enr.inc" -->
</td>
</tr>
</table>
</div>
<%
cn.close
%>
</body>
</html>
******************************************************
Where it says: HERE-> is where the server is inserting the numbers. When I try to print out the source after the page has been rendered, here is what I get:
******************************************************
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?xml veresultion="1.0" encoding="iso-8859-1"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>BU Snapshot Report beta(v.5)</title>
<link rel="stylesheet" type="text/css" media="screen" href="style/report.css" />
<link rel="stylesheet" type="text/css" media="print" href="style/print.css" />
<meta http-equiv="Content-Type" content="text/html; charesultet=iso-8859-1" />
</head>
<body>
<div>
<!-- Freshman -->
<table>
<tr>
<td valign="top" style="width:420px">
HERE-> 12218585343499
<!-- ####################################### HTML ##########################################-->
<div class="college">
<table>
<tr class="rowa">
<td class="lcell">LAS</td>
<td class="dcell">1421</td>
<td class="dcell">1299</td>
<td class="ccell">122</td>
<td class="dcell">9.39%</td>
</tr>
</tr>
</table>
<td valign="top">
HERE-> -647-7-40-40-233-47-6
<!-- ####################################### HTML ##########################################-->
<div class="college">
<table>
<tr class="rowa">
<td class="dcell">635</td>
<td class="dcell">647</td>
<td class="ccell">-647</td>
<td class="dcell">-100.00%</td>
</tr>
<tr class="rowb">
<td class="dcell">116</td>
<td class="dcell">123</td>
<td class="ccell">-7</td>
<td class="dcell">-5.69%</td>
</tr>
</table>
</div>
<td valign="top">
HERE-> 1351414883
<!-- ####################################### HTML ##########################################-->
<div class="college">
<table>
<tr class="rowa">
<td class="dcell">15</td>
<td class="dcell">2</td>
<td class="ccell">13</td>
<td class="dcell">650.00%</td>
</tr>
<tr class="rowb">
<td class="dcell">5</td>
<td class="dcell">0</td>
<td class="ccell">5</td>
<td class="dcell">No Data</td>
</tr>
</table>
</div>
</body>
</html>
***********************************************
This time where the "HERE->" is shows this number. I am including 3 files that run a query when opened, set some variables, and do some calculations on them before inserting them into the table. There are no Response.Write() functions, or any display functions until I get to the HTML tables at the bottom:(snippet)
************************************************
<%
sql_fr_app_curr_base = "SELECT COUNT(*) FROM rpt_daily_temp_curr WHERE ((StatusCluster = 'Applicant') OR (StatusCluster = 'Admit') OR (StatusCluster = 'Enrolled')) AND (EntryTermCluster LIKE '___Fall') AND ((Class_Num = 2) OR (Class_Num = 6))"
sql_fr_app_prev_base = "SELECT COUNT(*) FROM rpt_daily_temp_prev WHERE ((StatusCluster = 'Applicant') OR (StatusCluster = 'Admit') OR (StatusCluster = 'Enrolled')) AND (EntryTermCluster LIKE '___Fall') AND ((Class_Num = 2) OR (Class_Num = 6))"
sqlLAScurr = sql_fr_app_curr_base & " AND (MajorCat_Num = 8)"
SET rs = cn.execute(sqlLAScurr)
LAScurr = rs(0)
sqlLASprev = sql_fr_app_prev_base & " AND (MajorCat_Num = 8)"
SET rs = cn.execute(sqlLASprev)
LASprev = rs(0)
...
....
'###################################################################
IF (COEcurr = "NULL" OR COEprev= "NULL") THEN
COE_diff = "No Data"
ELSE
COE_diff = CInt(COEcurr) - CInt(COEprev)
Response.Write(COE_diff)
END IF
IF (COEprev = "NULL" OR COEprev = 0) THEN
COE_diff_perc = "No Data"
ELSE
COE_diff_perc = formatpercent((CInt(COE_diff)/CInt(COEprev)), 2)
END IF
'###################################################################
'CBA
IF (CBAcurr = "NULL" OR CBAprev= "NULL") THEN
CBA_diff = "No Data"
ELSE
CBA_diff = CInt(CBAcurr) - CInt(CBAprev)
Response.Write(CBA_diff)
END IF
IF (CBAprev = "NULL" OR CBAprev = 0) THEN
CBA_diff_perc = "No Data"
ELSE
CBA_diff_perc = formatpercent((CInt(CBA_diff)/CInt(CBAprev)), 2)
END IF
..
...
%>
<!-- ####################################### HTML ##########################################-->
<div class="college">
<table>
<tr class="rowa">
<td class="lcell">LAS</td>
<td class="dcell"><%= LAScurr %></td>
<td class="dcell"><%= LASprev %></td>
<td class="ccell"><%= LAS_diff %></td>
<td class="dcell"><%= LAS_diff_perc %></td>
</tr>
<tr class="rowb">
<td class="lcell">COE</td>
<td class="dcell"><%= COEcurr %></td>
<td class="dcell"><%= COEprev %></td>
<td class="ccell"><%= COE_diff %></td>
<td class="dcell"><%= COE_diff_perc %></td>
</tr>
...
...
</table>
</div>
************************************************************
Could it be the SQL? What would insert these numbers?
Thanks, and sorry if this is completely out of left field...
WoG