Date Comparison OnLoad Javascript event

IceChris

New member
Local time
Today, 12:25
Joined
Aug 10, 2006
Messages
7
Okay, me again, on my DAP (Data Access Page) I have a piece of JavaScript that tells my page onload compare 2 dates. It's straight forward and all and my code works. That's actually where the problem is... When access loads my DAP up it builds the page, executes the javascript and THEN populates my fields with all the records. So my comparison javascript will always execute BEFORE the data loads into my DAP...


<body language=”javascript” onload=”colorBox();”>

<SCRIPT LANGUAGE=”javascript”>
Function colorBox(){
If (Quarter1DueDateP1 >= Quarter1CompleteddateP1){
Box3.{background-color:Green;}
}
Elseif (Quarter1CompleteddateP1>=Quarter1DueDateP1){
Box3.{background-color:Red;}
}
Else {
Box3.{background-color:Yellow;}
}
}
 
Again, need this quickly, I've moved this back to the front page of the Que...Please any ideas?! Even how to make this work for a mouseover event or onclick, cause right now the code above doesn't work for either one of those and I don't know whay.
 

Users who are viewing this thread

Back
Top Bottom