computergeek
Programmer
Hello,
My code uses the example found at I highlight the current day row within the grid I create within the scrollable window. HAS ANYONE USED THIS EXAMPLE? I AM TRYING TO AUTOMATICALLY SCROLL DOWN TO THE HIGHLIGHTED ROW WITHIN MY GRID created from an ADO recordset...BUT I can't figure out what gets executed when the down arrow is clicked on the scrollable window (ilayer I think). If I could figure out what is being executed when the down arrow is clicked I could go from there... The following is a partial snippet of code.
<ilayer name="scroll1" width="100%" height="150" clip="0,0,700,150">
<layer name="scroll2" width="100%" height="150" bgColor="white">
<div id="scroll3" style="width:100%;height:150;background-color:white;overflow:scroll">
<!-- Get data -->
<%total_rows = GetOrdersData()%>
<% if total_rows < 1 then%>
<b>
<%Response.Write "No orders currently exist" %>
</b>
<% else %>
<!-- Build the grid within the scrollable window -->
<table cellpadding="2" cellspacing="1" bordercolordark="#999999" bordercolorlight="#99ccff" bgcolor="White" border="2" cols="9" rules="ALL" WIDTH="98.5%">
<%Do while Not rsOrdersData.EOF
strEtadate = trim(rsOrdersData.fields("eta_date")
strEtadate = FormatDate (strEtadate,1)
strQty = formatnumber (rsOrdersData.fields("quantity", 1)
ETC.... Code here works fine.
<%if Cdate(dtlocaldate) <> Date() then
' Set to default row color of white
displaycolor = "#FFFFFF"
else
' Highlight row light blue
displaycolor = "#99CCFF"
end if
<tr bgcolor="<%=displaycolor%>">
<td WIDTH="20%" align="left"><%=strEtadate%> </td>
MORE CODE HERE...
</div>
</layer>
</ilayer>
<br>
<!-- Confused about this piece of code... think it maybe only used for Netscape users, left it out for now as we do not support Netscape browsers -->
<span style="display:none" style="&{nsstyle};"><a href="#" onMousedown="up()" onMouseup="clearup()" onClick="return false" onMouseout="clearup()">Up</a> | <a href="#" onMousedown="down()" onMouseup="cleardown()" onClick="return false" onMouseout="cleardown()">Down</a> | <a href="#" onClick="if (document.layers) scrolldoc.top=0;return false">Top</a> | <a href="#" onClick="if (document.layers) scrolldoc.top=scrolldoc.document.height*(-1)+150;return false">Bottom</a></span>
My code uses the example found at I highlight the current day row within the grid I create within the scrollable window. HAS ANYONE USED THIS EXAMPLE? I AM TRYING TO AUTOMATICALLY SCROLL DOWN TO THE HIGHLIGHTED ROW WITHIN MY GRID created from an ADO recordset...BUT I can't figure out what gets executed when the down arrow is clicked on the scrollable window (ilayer I think). If I could figure out what is being executed when the down arrow is clicked I could go from there... The following is a partial snippet of code.
<ilayer name="scroll1" width="100%" height="150" clip="0,0,700,150">
<layer name="scroll2" width="100%" height="150" bgColor="white">
<div id="scroll3" style="width:100%;height:150;background-color:white;overflow:scroll">
<!-- Get data -->
<%total_rows = GetOrdersData()%>
<% if total_rows < 1 then%>
<b>
<%Response.Write "No orders currently exist" %>
</b>
<% else %>
<!-- Build the grid within the scrollable window -->
<table cellpadding="2" cellspacing="1" bordercolordark="#999999" bordercolorlight="#99ccff" bgcolor="White" border="2" cols="9" rules="ALL" WIDTH="98.5%">
<%Do while Not rsOrdersData.EOF
strEtadate = trim(rsOrdersData.fields("eta_date")
strEtadate = FormatDate (strEtadate,1)
strQty = formatnumber (rsOrdersData.fields("quantity", 1)
ETC.... Code here works fine.
<%if Cdate(dtlocaldate) <> Date() then
' Set to default row color of white
displaycolor = "#FFFFFF"
else
' Highlight row light blue
displaycolor = "#99CCFF"
end if
<tr bgcolor="<%=displaycolor%>">
<td WIDTH="20%" align="left"><%=strEtadate%> </td>
MORE CODE HERE...
</div>
</layer>
</ilayer>
<br>
<!-- Confused about this piece of code... think it maybe only used for Netscape users, left it out for now as we do not support Netscape browsers -->
<span style="display:none" style="&{nsstyle};"><a href="#" onMousedown="up()" onMouseup="clearup()" onClick="return false" onMouseout="clearup()">Up</a> | <a href="#" onMousedown="down()" onMouseup="cleardown()" onClick="return false" onMouseout="cleardown()">Down</a> | <a href="#" onClick="if (document.layers) scrolldoc.top=0;return false">Top</a> | <a href="#" onClick="if (document.layers) scrolldoc.top=scrolldoc.document.height*(-1)+150;return false">Bottom</a></span>