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

Discussion in 'Javascript' started by techy techno, Feb 4, 2004.

  1. techy techno

    techy techno Guest

    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!
     
    techy techno, Feb 4, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. .Net Sports
    Replies:
    2
    Views:
    371
    =?Utf-8?B?VG9tIEFuZGVyc29u?=
    Jan 20, 2006
  2. chuck amadi
    Replies:
    1
    Views:
    509
    Larry Bates
    Jun 23, 2004
  3. Chris
    Replies:
    4
    Views:
    438
    Chris
    Aug 20, 2007
  4. bg
    Replies:
    0
    Views:
    114
  5. Diogenes

    Why is this happening? IE7 only error

    Diogenes, Mar 2, 2007, in forum: Javascript
    Replies:
    7
    Views:
    97
Loading...

Share This Page