Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > how can I stop this happening to the BODY of the page but only the desired place

Reply
Thread Tools

how can I stop this happening to the BODY of the page but only the desired place

 
 
techy techno
Guest
Posts: n/a
 
      02-04-2004

hiii

I am actually comparing the date inserted with the current date...

if the todays date is EQUAL to the date inserted for the cheque dueDate
then there is a flashing message telling the user that the cheque
dueDAte is today...I have 2 questions with this topic :

1. Now this javascript is giving a LIGHTING effect to the whole page..I
actually want it for only message not for the whole body of the
page..this code is making each and every image / object in the page to
lighten.. I just want the text "Cheque has to be cleared today from " to
HIGHLIGHT

2. I want some kinda amendment in the ASP code of if the cheque due date
is a holiday then it should show that the next day...i.e. once the user
sees a lighting text he should check that using a checkbox and a seen
button.
IF the day goes further it should STILL show the previous dueCheques
until he clears them by checking the checkbox given

here is the code :

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
set cn=server.CreateObject("adodb.connection")
'Set rs=Server.CreateObject("adodb.recordset")
mp=server.MapPath("salesDB.mdb")
cn.Open"provider=Microsoft.jet.oledb.4.0;Data Source="&mp

'SQLstmt="Insert into myToday (dueDate,rdate)"
'Response.Write "DONE"
'SQLstmt = SQLstmt & "VALUES ('" & get_date & "', '" & recv_date & "')"
'response.write SQLstmt
'cn.Execute SQLstmt
mysql = "Select dueDate,rdate,coName from myToday"
Set objRec = Server.CreateObject("ADODB.Recordset")
objRec.Open mysql, cn


%>
<HTML>
<HEAD>
<TITLE> FLASH REMINDER </TITLE>
</HEAD>
<% Response.Write Date %> <br>
<BODY>
<SPAN id="theText" style="WIDTH: 100%">
<% while not objRec.EOF%>
<%
cheque_due_date = objRec("dueDate")
company = objRec("coName")
today_date = FormatDateTime(Date)
recv_date = objRec("rDate")

If cheque_due_date = today_date Then
Response.Write "Cheque has to be cleared today from " & "<h4>" & company
& "</h4>" & "<br>"
End If
%>
<%objRec.MoveNext
wend%>
<SCRIPT>
var from = 5; //the animation start value
var to = 11; //the animation end value
var delay = 10; //the animation speed
var glowColor = "red"; //the first color
var glowColor2 = "white"; //the second color
var glowColor3 = "yellow"; //the third color
var glowColor4 = "lime"; //4th color
var glowColor5 = "white"; //5th color
var glowColor6 = "magenta"; //last color
//no more editing
var i = to;
var j = 0;
textPulseDown();
function textPulseUp()
{
if (!document.all)
return
if (i < to)
{
theText.style.filter = "Glow(Color=" + glowColor + ", Strength=" + i +
")";
i++;
theTimeout = setTimeout('textPulseUp()',delay);
return 0;
}
if (i = to)
{
theTimeout = setTimeout('textPulseDown()',delay);
return 0;
}
}
function textPulseDown()
{
if (!document.all)
return
if (i > from)
{
theText.style.filter = "Glow(Color=" + glowColor2 + ", Strength=" + i +
")";
i--;
theTimeout = setTimeout('textPulseDown()',delay);
return 0;
}
if (i = from)
{
theTimeout = setTimeout('textPulseUp2()',delay);
return 0;
}
}
function textPulseUp2()
{
if (!document.all)
return
if (i < to)
{
theText.style.filter = "Glow(Color=" + glowColor3 + ", Strength=" + i +
")";
i++;
theTimeout = setTimeout('textPulseUp2()',delay);
return 0;
}
if (i = to)
{
theTimeout = setTimeout('textPulseDown2()',delay);
return 0;
}
}
function textPulseDown2()
{
if (!document.all)
return
if (i > from)
{
theText.style.filter = "Glow(Color=" + glowColor4 + ", Strength=" + i +
")";
i--;
theTimeout = setTimeout('textPulseDown2()',delay);
return 0;
}
if (i = from)
{
theTimeout = setTimeout('textPulseUp3()',delay);
return 0;
}
}
function textPulseUp3()
{
if (!document.all)
return
if (i < to)
{
theText.style.filter = "Glow(Color=" + glowColor5 + ", Strength=" + i +
")";
i++;
theTimeout = setTimeout('textPulseUp3()',delay);
return 0;
}
if (i = to)
{
theTimeout = setTimeout('textPulseDown3()',delay);
return 0;
}
}
function textPulseDown3()
{
if (!document.all)
return
if (i > from)
{
theText.style.filter = "Glow(Color=" + glowColor6 + ", Strength=" + i +
")";
i--;
theTimeout = setTimeout('textPulseDown3()',delay);
return 0;
}
if (i = from)
{
theTimeout = setTimeout('textPulseUp()',delay);
return 0;
}
}
//-->
</SCRIPT>
</BODY>
</HTML>
thanks

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
G++ paste operator - expands as desired but compile fails Chris C++ 4 08-20-2007 09:38 PM
can not catch the desired page, unless twice posted? bg ASP .Net Web Controls 0 12-28-2004 08:08 AM
how to write jsp custom tag that can have all kind of jsp elements(not only other tags but also srciplets) in his body Lukasz Indyk Java 1 09-22-2004 12:43 PM
parse output screen ok but cant get desired output new file! chuck amadi Python 1 06-23-2004 02:16 PM



Advertisments