The code below displays various phases of a project and then animates the currently selected project phase.
I also want to have a finger point up to the currently animated project phase.
That is where I am having problem right now.
The line of code:
is intended to accomplish 2 things.
1, automatically assing point.gif to each project phase,
2, hide all point.gif images only showing a gif for the currently animated project phase.
So far, the only thing seems to work is the fact the point.gif images are all hidden
Below is the code. Any help in pointing out what I am missing will be appreciated.
Thanks all,
I also want to have a finger point up to the currently animated project phase.
That is where I am having problem right now.
The line of code:
Code:
<SPAN style="display: none;" ID="arrow<%=id%>"><IMG SRC="point.gif"></SPAN>
is intended to accomplish 2 things.
1, automatically assing point.gif to each project phase,
2, hide all point.gif images only showing a gif for the currently animated project phase.
So far, the only thing seems to work is the fact the point.gif images are all hidden
Below is the code. Any help in pointing out what I am missing will be appreciated.
Code:
<HTML>
<BODY bgcolor=lavender>
<Center><h3>PROJECT PHASES</3></CENTER><br><br>
<TABLE CellPadding=10>
<TR>
<%
Set DataConnection=Server.CreateObject("ADODB.Connection")
DataConnection.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;" & _
"DATA SOURCE=" & server.mappath("PROJECT.mdb")
sql = "SELECT phaseID, strProduct FROM Phases ORDER BY phaseID"
set RS = DataConnection.Execute(sql)
Do Until RS.EOF
id = RS("phaseID")
%>
<TD ID="p<%=id%>" align=center valign=center>
<IMG SRC="phase<%=id%>.jpg"><BR/>
<%=RS("strProduct")%><BR/>
<SPAN style="display: none;" ID="arrow<%=id%>"><IMG SRC="point.gif"></SPAN>
</TD>
<%
RS.MoveNext()
loop
RS.Close
%>
</TABLE>
<SCRIPT Language=JavaScript>
// use phase number passed in via querystring:
var selectedPhase = <%=CINT(Request("phaseID"))%>;
//document.getElementById("arrow"+selectedPhase).style.display = "inline";
var blinker = 256;
function blink( )
{
var cell = document.getElementById("p" + selectedPhase);
blinker += 32;
if ( blinker > 255 ) blinker = 128;
var hex = ( blinker + 256 ).toString(16);
cell.style.backgroundColor = "#" + hex.substring(1) + "0000";
setTimeout( "blink()", 100 );
}
// get things started
blink( );
</SCRIPT>
</BODY></HTML>
Thanks all,