asp.net|js| Display js file (named Function.js here)
function Mm_reloadpage (init)
{//reloads the window if Nav4 resized
if (init==true) with (navigator) {if (appname== "Netscape") && (parseint (appversion) ==4)) {
document. Mm_pgw=innerwidth; Document. Mm_pgh=innerheight; Onresize=mm_reloadpage; }}
else if (innerwidth!=document. MM_PGW | | Innerheight!=document. MM_PGH) location.reload ();
}
Mm_reloadpage (TRUE);
function Mm_findobj (n, D)
{//v4.01
var p,i,x; if (!d) d=document; if ((P=n.indexof ("?")) >0&&parent.frames.length) {
d=parent.frames[n.substring (p+1)].document; N=n.substring (0,p);}
if (!) ( X=d[n]) &&d.all) x=d.all[n]; for (i=0;! x&&i<d.forms.length;i++) X=d.forms[i][n];
for (i=0;! x&&d.layers&&i<d.layers.length;i++) X=mm_findobj (n,d.layers[i].document);
if (!x && d.getElementById) X=d.getelementbyid (n); return x;
}
function MM_showHideLayers ()
{//v6.0
var i,p,v,obj,args=mm_showhidelayers.arguments;
for (i=0 i< (args.length-2); i+=3) if ((Obj=mm_findobj (args[i))!=null) {v=args[i+2];
if (obj.style) {obj=obj.style; v= (v== ' show ')? ' Visible ':(v== ' hide ')? ' Hidden ': v; }
Obj.visibility=v; }
}
the template column in the DataGrid
<asp:TemplateColumn>
<ItemTemplate>
<div onmouseover= "MM_showHideLayers (' layer<%# DataBinder.Eval, Container") dataitem.f_id ', ', ' Show ') "onmouseout=" MM_showHideLayers (' layer<%# databinder.eval (Container, "dataitem.f_id")%> ', ', ' hide ') >
<font color=blue><u> Detailed information </U></font>
</div>
<span id= ' layer<%# databinder.eval (Container, "dataitem.f_id")%> ' style= ' position:absolute; left=420; top:100; width:300; Z-index:1; Layer-background-color: #FFFFCC; border:1px none #000000; Visibility:hidden; " >
<table width= "100%" border= "0" cellpadding= "ten" cellspacing= "1" bgcolor= "#000000" >
<tr>
<td bgcolor= "#FFFFCC" >
<%# DataBinder.Eval (Container, "Dataitem.f_memo")%>
</td>
</tr>
</table>
</span>
</ItemTemplate>
</asp:TemplateColumn>
contains <script src=function.js></script> in your aspx file (if the JS file is in the same directory as your ASPX file), the f_id in the template column above is to display the primary key of the table ( The DataKeyField in the DataGrid), F_memo is the information that pops up when the user moves the mouse over "details."