Advertisement
2_2002-2004 String Manipulation #128831

Variable Tool Tips

This Article explain and gives an example how to create a tool-tips in ASP page includes the data from one or more fields in the database in a grid.

AI

Resumen de IA: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Código fuente
original-source
It is possible to make a custom, professional-looking tool-tips in .html files, using "Overlib.js" by Erik Bosrup. How about tool-tips changing from row to row in table when looping the database?
  For instance, you need to query a database table and display it in html table. And every row has a "memo" description which will take too much space if display and at the same time is unique for every row. 
  I included "Overlib.js" like:
<script
LANGUAGE="JavaScript" SRC="overlib.js"></script>
somewhere in the body of my Page. I placed it at the bottom. 
  Then I placed:
<div id="overDiv" style="position:absolute; visibility:hide; z-index:1;">
</div>
  So, what's new? Everybody knows it. Yes and now.
  I used a variable of Recordsource field for the text of tool-tip. Like this:
      <%Do While NOT RS.EOF%>
<tr><%For i = 1 To RS.Fields.Count -1%><TD>
       <p onmouseover="overlib('<b><i><font color=\'#FFFFFF\' size=\'1\' face=\'Verdana,Arial,Helvetica\'><%=RS.Fields("ad_description")%></font></i></b>', FULLHTML); return true;" onmouseout="nd(); return 
true;"><a href="http://www.planet-source-code.com"><%=RS.Fields(i)%></a></td><%Next%></tr>
<%RS.MoveNext%>
<%Loop%>
  Here I placed "ad_description" field in every field for every row in my table. It obviously would be different for every row, save you space and make the Page look more professional. 
  This idea may be used for different purposes.
  Happy programming!
Comentarios originales (3)
Recuperado de Wayback Machine