Afternoon all,
I have a Web based Sales tracker that sales agents sumbitted information onto a web page that then goes into an Access database, using ASP Javascript and/or VBScript
I have webpages that are linked to Access queries that show the volumes of sales by agent, for example
Name Sales
Agent1 5
Agent2 3
Agent3 1
Then once the webpage is refreshed (so it re runs the query in access) it displayed this:
Name Sales
Agent1 6
Agent2 4
Agent3 1
Agent1 and Agent2 flash a different colour to show that they have added a new sale
Really hope that makes sense
Can anyone help
Massive Thanks
3 2297
I think we can help. But, first what code have you got for the page so that we can build off of it.
Happy Coding,
CroCrew~
Here is a copy of the code
It's the Sales Column I want to flash a colour when it changes. Really appreciate your help
Thanks - <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
-
<!--#include file="../Connections/database1.asp" -->
-
<%
-
Dim Totals__MMColParam
-
Totals__MMColParam = "Steven Thomas"
-
If (Request("MM_EmptyValue") <> "") Then
-
Totals__MMColParam = Request("MM_EmptyValue")
-
End If
-
%>
-
<%
-
Dim Totals
-
Dim Totals_cmd
-
Dim Totals_numRows
-
-
Set Totals_cmd = Server.CreateObject ("ADODB.Command")
-
Totals_cmd.ActiveConnection = MM_database1_STRING
-
Totals_cmd.CommandText = "SELECT * FROM QryWallboardTeamPremiums WHERE Team = ?"
-
Totals_cmd.Prepared = true
-
Totals_cmd.Parameters.Append Totals_cmd.CreateParameter("param1", 200, 1, 50, Totals__MMColParam) ' adVarChar
-
-
Set Totals = Totals_cmd.Execute
-
Totals_numRows = 0
-
%>
-
<%
-
Dim Recordset2__MMColParam
-
Recordset2__MMColParam = "Steven Thomas"
-
If (Request("MM_EmptyValue") <> "") Then
-
Recordset2__MMColParam = Request("MM_EmptyValue")
-
End If
-
%>
-
<%
-
Dim Recordset2
-
Dim Recordset2_cmd
-
Dim Recordset2_numRows
-
-
Set Recordset2_cmd = Server.CreateObject ("ADODB.Command")
-
Recordset2_cmd.ActiveConnection = MM_database1_STRING
-
Recordset2_cmd.CommandText = "SELECT * FROM QryWallboardbyAgentPremiums5 WHERE Team = ? ORDER BY Conversion DESC"
-
Recordset2_cmd.Prepared = true
-
Recordset2_cmd.Parameters.Append Recordset2_cmd.CreateParameter("param1", 200, 1, 50, Recordset2__MMColParam) ' adVarChar
-
-
Set Recordset2 = Recordset2_cmd.Execute
-
Recordset2_numRows = 0
-
%>
-
<%
-
Dim TotalCallsbyTeam__MMColParam
-
TotalCallsbyTeam__MMColParam = "Steven Thomas"
-
If (Request("MM_EmptyValue") <> "") Then
-
TotalCallsbyTeam__MMColParam = Request("MM_EmptyValue")
-
End If
-
%>
-
<%
-
Dim TotalCallsbyTeam
-
Dim TotalCallsbyTeam_cmd
-
Dim TotalCallsbyTeam_numRows
-
-
Set TotalCallsbyTeam_cmd = Server.CreateObject ("ADODB.Command")
-
TotalCallsbyTeam_cmd.ActiveConnection = MM_database1_STRING
-
TotalCallsbyTeam_cmd.CommandText = "SELECT SumOfNumberofCalls FROM QryTotalNumberofCallsbyTeam WHERE Team = ?"
-
TotalCallsbyTeam_cmd.Prepared = true
-
TotalCallsbyTeam_cmd.Parameters.Append TotalCallsbyTeam_cmd.CreateParameter("param1", 200, 1, 50, TotalCallsbyTeam__MMColParam) ' adVarChar
-
-
Set TotalCallsbyTeam = TotalCallsbyTeam_cmd.Execute
-
TotalCallsbyTeam_numRows = 0
-
%>
-
<%
-
Dim TeamConversion__MMColParam
-
TeamConversion__MMColParam = "Steven Thomas"
-
If (Request("MM_EmptyValue") <> "") Then
-
TeamConversion__MMColParam = Request("MM_EmptyValue")
-
End If
-
%>
-
<%
-
Dim TeamConversion
-
Dim TeamConversion_cmd
-
Dim TeamConversion_numRows
-
-
Set TeamConversion_cmd = Server.CreateObject ("ADODB.Command")
-
TeamConversion_cmd.ActiveConnection = MM_database1_STRING
-
TeamConversion_cmd.CommandText = "SELECT CountOfMediaRoute FROM QryConversionInboundTeam WHERE Team = ?"
-
TeamConversion_cmd.Prepared = true
-
TeamConversion_cmd.Parameters.Append TeamConversion_cmd.CreateParameter("param1", 200, 1, 50, TeamConversion__MMColParam) ' adVarChar
-
-
Set TeamConversion = TeamConversion_cmd.Execute
-
TeamConversion_numRows = 0
-
%>
-
<%
-
Dim Repeat2__numRows
-
Dim Repeat2__index
-
-
Repeat2__numRows = -1
-
Repeat2__index = 0
-
Recordset2_numRows = Recordset2_numRows + Repeat2__numRows
-
%>
-
<%
-
Dim Repeat1__numRows
-
Dim Repeat1__index
-
-
Repeat1__numRows = -1
-
Repeat1__index = 0
-
DSSales_numRows = DSSales_numRows + Repeat1__numRows
-
%>
-
<% on error resume next%>
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
<html xmlns="http://www.w3.org/1999/xhtml">
-
<head>
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-
<title>Steven Thomas Wallboard</title>
-
<style type="text/css">
-
<!--
-
.style1 {
-
font-size: 18px;
-
font-weight: bold;
-
}
-
.style2 {
-
color: #FFFFFF;
-
font-weight: bold;
-
}
-
-->
-
</style>
-
-
<style type="text/css">
-
<!--
-
.style3 {
-
font-size: 12px;
-
font-weight: bold;
-
}
-
.style4 {font-size: 12px}
-
.style8 {font-size: 14; font-weight: bold; }
-
.style11 {font-size: 10px}
-
-->
-
</style>
-
</head>
-
-
<body>
-
<div align="center">
-
<p class="style1">Steven Thomas Wallboard </p>
-
</div>
-
<div align="center">
-
<table centre border="1">
-
<tr>
-
<td bordercolor="#FFFFFF" bgcolor="#FF0000"><div align="center" class="style2">AgentName</div></td>
-
<td bordercolor="#FFFFFF" bgcolor="#FF0000"><div align="center" class="style2">Calls</div></td>
-
<td bordercolor="#FFFFFF" bgcolor="#FF0000"><div align="center" class="style2">
-
<div align="center">Sales</div>
-
</div></td>
-
<td bordercolor="#FFFFFF" bgcolor="#FF0000"><div align="center" class="style2">Conversion</div></td>
-
</tr>
-
<%
-
While ((Repeat2__numRows <> 0) AND (NOT Recordset2.EOF))
-
%>
-
<tr>
-
<td><div align="center"><span class="style3 style4"><%=(Recordset2.Fields.Item("FriendlyName").Value)%></span></div></td>
-
<td><div align="center">
-
<div align="center"><span class="style3"><%=(Recordset2.Fields.Item("Calls").Value)%></span></div></td>
-
<td class="style8"><div align="center"><span class="style3"><%=(Recordset2.Fields.Item("Sales").Value)%></span></div></td>
-
<td class="style8">
-
<div align="center">
-
<div align="center"><%= FormatPercent((Recordset2.Fields.Item("Conversion").Value), 2, -2, -2, -2) %></div></td>
-
</tr>
-
<%
-
Repeat2__index=Repeat2__index+1
-
Repeat2__numRows=Repeat2__numRows-1
-
Recordset2.MoveNext()
-
Wend
-
%>
-
<tr>
-
<td height="23"><div align="center" class="style3">
-
<div align="center">Totals</div>
-
</div></td>
-
<td><div align="center"><span class="style3"> <%=(TotalCallsbyTeam.Fields.Item("SumOfNumberofCalls").Value)%> </span></div></td>
-
<td><div align="center"><span class="style3"><%=(Totals.Fields.Item("Total of MediaRoute").Value)%></span></div></td>
-
<td><div align="center"><strong class="style8"><%= FormatNumber(((Totals.Fields.Item("Total of MediaRoute").Value)) / ((TotalCallsbyTeam.Fields.Item("SumOfNumberofCalls").Value)/100), 2, -2, -2, -2)%>%</strong></div></td>
-
</tr>
-
</table>
-
<form id="form1" name="form1" method="post" action="">
-
<p class="style1"> </p>
-
<p> </p>
-
</form>
-
<p><img src="http://bytes.com/topic/asp-classic/images/LSGlogoWallboard.gif" alt="LSG" width="124" height="100" /></p>
-
</div>
-
<div align="center"></div>
-
</body>
-
</html>
-
<%
-
Totals.Close()
-
Set Totals = Nothing
-
%>
-
<%
-
Recordset2.Close()
-
Set Recordset2 = Nothing
-
%>
-
<%
-
TotalCallsbyTeam.Close()
-
Set TotalCallsbyTeam = Nothing
-
%>
-
<%
-
TeamConversion.Close()
-
Set TeamConversion = Nothing
-
%>
The page should make an AJAX call to get updated information. You can then use javascript to compare the old value against the new value retreived with AJAX.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Reply Via Newsgroup |
last post by:
Folks,
Say I have a table, ten columns, ten rows - Each with a word in it. I want
to change the values of some/all of the cells in the table via a hyperlink.
How do I reference each cell and...
|
by: Sujan |
last post by:
Hello all,
Is it possible to change the text of Address bar when i click on any
link. Does any one knows the script to do this.
Sujan.
|
by: amber |
last post by:
Hi there,
I'd like to change the colour of my tabs. I can change my background colour
of my tab control, but the actual tabs, with the text on them don't change
colour.
Am I missing something?...
|
by: Patrick Noll |
last post by:
hi ng,
i have a problem when i try to change the text property of
a TreeNode just before the user is able to edit this property.
Example:
// Label before anything happens...
TreeNode.Text =...
|
by: FAQ server |
last post by:
-----------------------------------------------------------------------
FAQ Topic - How do I change the text in the url/location bar?...
|
by: go2bee |
last post by:
How to do import/copy text from webpage <textarea> and <text> to text in form MS-Access97
Thankyou.
|
by: go2bee |
last post by:
How to do import/copy text from webpage <textarea> and <text> paste to text in the form MS-Access97
Thankyou!
|
by: ramadeviirrigireddy |
last post by:
Hi All,
I'm new to this group. I'm working on Java/J2ee. In my project i have one bricklet with header it will have some default color.But when mouseovers on this header i need to change the...
|
by: K Viltersten |
last post by:
I have the following button:
<asp:LinkButton id="Btn" runat="server" text="Click">
</asp:LinkButton>
I have added an action listener in the javascript
where I change the text on it:...
|
by: =?Utf-8?B?UGF1bA==?= |
last post by:
Hi I tried a google search but could not find anything. I am trying to cause
one webpage to reload when a second web page is closed. The second webpage
loads data into a session variable and when...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |