Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic Scrollable window using ilayer, layer, div

Status
Not open for further replies.

computergeek

Programmer
May 23, 2001
193
CA
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=&quot;scroll1&quot; width=&quot;100%&quot; height=&quot;150&quot; clip=&quot;0,0,700,150&quot;>
<layer name=&quot;scroll2&quot; width=&quot;100%&quot; height=&quot;150&quot; bgColor=&quot;white&quot;>
<div id=&quot;scroll3&quot; style=&quot;width:100%;height:150;background-color:white;overflow:scroll&quot;>
<!-- Get data -->
<%total_rows = GetOrdersData()%>
<% if total_rows < 1 then%>
<b>
<%Response.Write &quot;No orders currently exist&quot; %>
</b>
<% else %>
<!-- Build the grid within the scrollable window -->
<table cellpadding=&quot;2&quot; cellspacing=&quot;1&quot; bordercolordark=&quot;#999999&quot; bordercolorlight=&quot;#99ccff&quot; bgcolor=&quot;White&quot; border=&quot;2&quot; cols=&quot;9&quot; rules=&quot;ALL&quot; WIDTH=&quot;98.5%&quot;>
<%Do while Not rsOrdersData.EOF
strEtadate = trim(rsOrdersData.fields(&quot;eta_date&quot;))
strEtadate = FormatDate (strEtadate,1)
strQty = formatnumber (rsOrdersData.fields(&quot;quantity&quot;), 1)
ETC.... Code here works fine.

<%if Cdate(dtlocaldate) <> Date() then
' Set to default row color of white
displaycolor = &quot;#FFFFFF&quot;
else
' Highlight row light blue
displaycolor = &quot;#99CCFF&quot;
end if

<tr bgcolor=&quot;<%=displaycolor%>&quot;>
<td WIDTH=&quot;20%&quot; align=&quot;left&quot;><%=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=&quot;display:none&quot; style=&quot;&amp;{nsstyle};&quot;><a href=&quot;#&quot; onMousedown=&quot;up()&quot; onMouseup=&quot;clearup()&quot; onClick=&quot;return false&quot; onMouseout=&quot;clearup()&quot;>Up</a> | <a href=&quot;#&quot; onMousedown=&quot;down()&quot; onMouseup=&quot;cleardown()&quot; onClick=&quot;return false&quot; onMouseout=&quot;cleardown()&quot;>Down</a> | <a href=&quot;#&quot; onClick=&quot;if (document.layers) scrolldoc.top=0;return false&quot;>Top</a> | <a href=&quot;#&quot; onClick=&quot;if (document.layers) scrolldoc.top=scrolldoc.document.height*(-1)+150;return false&quot;>Bottom</a></span>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top