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%].doc ument; 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 ++) xw.mm_findobj(n,d.layers+ I }.doc ument );
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 ')? 'Ddden ': v ;}
Obj. visibility = v ;}
}
| Create a 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> details </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 = "10" cellspacing = "1" bgcolor = "#000000"> <Tr> <Td bgcolor = "# FFFFCC"> <% # DataBinder. Eval (Container, "DataItem. f_Memo") %> </Td> </Tr> </Table> </Span> </ItemTemplate> </Asp: TemplateColumn> Include <script src = Function. js> </script> (if the JS file is in the same directory as your aspx file), f_ID in the template column above is to display the table's primary key (that is, DataKeyField in the DataGrid ), f_Memo is the information displayed when you move your mouse over "details. |