Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old January 22nd, 2005, 09:27 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: abu dbabi, , United Arab Emirates.
Posts: 518
Thanks: 0
Thanked 0 Times in 0 Posts
Default Row blinking or Row Red

how can display the row blinking or row color red in asp ?


I use following coding in asp, how can display the records when payment of customer will due ?
we have number of customer, mostly our customer purchase good on credit basis.
I make report of all customer which payment is due.

I want the with in one month if customer not pay the balance

1. change the color of it row red or
2. this customer name row start blinking ?

How ?


how can use above in following coding that how many customers payment is due ?

<%
set cn=server.CreateObject("adodb.connection")
set rs=server.CreateObject("adodb.recordset")
cn.ConnectionString=" " // connection string
cn.Open

pn=Request.QueryString("pn")

rs.Open "select rec_id,custno,name,posit,pdate,dept,bstatus from customer order by name",cn,3,1

rs.PageSize=1000




Dim fielddata
dim v
v = 1

do while rs.eof=false
if v mod 2 = 0 then // if payment due this row do blinking or row color red
   Response.Write("<tr bgcolor=red>")
else
   Response.Write("<tr bgcolor=f8f8ff>")

end if


Response.Write("<td><input type=checkbox name=delrec value='" & rs("rec_id") & "' ></td>")

Response.Write("<td align=center>")
Response.Write("<a target=_self title='Select name' href='update_customer.asp?cust=" & (rs("custno")) & "'>" & rs("custno") & "</a>")
Response.Write("</td>")

Response.Write("<td>" & rs("Name") & "</td>")
Response.Write("<td>" & rs("posit") & "</td>")
Response.Write("<td align=center>" & rs("pdate") & "</td>")
....
...


v = v + 1

rs.movenext
loop

%>
record display like this.

custno..........name................position...... ........pdate
--------------------------------------------------------------------
1212...........John............Engineer........... .....21-1-2005..........// payment due
1013...........King.............Surveyor.......... ......23-1-2005........// payment not due
1014...........Peter............Technician........ .....15-1-2005........// payment due
1014...........Mark............Technician......... ....10-1-2005........// payment due
1013...........Martin............Asstt Engr............25-2-2005.......// payment not due
....
...

John and Peter and Mark payment have due, these row should be blinking or row color become red how ?


regards.

Mateen












  #2 (permalink)  
Old January 22nd, 2005, 11:47 AM
Friend of Wrox
 
Join Date: Dec 2004
Location: Chennai, Tamil nadu, India.
Posts: 307
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Vadivel Send a message via Yahoo to Vadivel
Default

Check out this sample code:

<html>
<head>
<script type="text/javascript">
function TextBlinker()
{
   pymtDue = document.getElementById('tblRow1');
   pymtDue.style.visibility=(pymtDue.style.visibility =='visible') ?'hidden':'visible';
}
</script>
</head>
<body onload="setInterval('TextBlinker()',300)">

<table>
  <tr id="tblRow1">
     <td>http://vadivel.thinkingms.com :)</td>
  </tr>
</table>
</body>
</html>

Best Regards
Vadivel

MVP ASP/ASP.NET
http://vadivel.thinkingms.com
  #3 (permalink)  
Old January 24th, 2005, 05:53 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: abu dbabi, , United Arab Emirates.
Posts: 518
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks for your response.

this sample is good for fix data.

if data are change daily and data received with the database
(sql server) how can use this code ?
what condition will use ?

regards.

Mateen



  #4 (permalink)  
Old January 24th, 2005, 06:15 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

The example Vadivel has given is for no particular type of data, its to make a string of text flash. This string can be static or dynamic.

Wind is your friend
Matt
  #5 (permalink)  
Old January 26th, 2005, 05:40 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: abu dbabi, , United Arab Emirates.
Posts: 518
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks for response.

how can use this string in above coding ?

regards.

Mateen




Similar Threads
Thread Thread Starter Forum Replies Last Post
Scrollbar in row of Datagrid Except Header Row Theone84 ASP.NET 2.0 Professional 0 August 11th, 2008 12:10 AM
ROW BY ROW COMPARISON AND UPDATION Gaurav10b SQL Server 2000 6 June 2nd, 2007 04:17 PM
To retrieve a row by giving row number prad_a MySQL 1 March 22nd, 2007 11:20 PM
Read a column and Search Row by Row in another col AyatKh Excel VBA 2 January 26th, 2005 12:02 PM
Manage data row by row in datagrid Dragonist Classic ASP Databases 5 July 29th, 2004 04:17 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.