Ver Mensaje Individual
  #5 (permalink)  
Antiguo 17/09/2008, 12:43
tranillo
 
Fecha de Ingreso: septiembre-2008
Mensajes: 1
Antigüedad: 15 años, 8 meses
Puntos: 0
Respuesta: Tooltip al sobreponer el cursor sobre el texto de un drop down list (selec

Utiliza esto dentro del codigo que te muestra en asp.net

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="pv.aspx.vb" Inherits="pv" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
----------------------------------------aqui creas la función----------------------------
<script language="javascript">
function showTip(oSel) {
var theTip = document.getElementById("spnTip");
theTip.style.top = window.event.clientY + 20;
theTip.style.left = window.event.clientX;
theTip.innerText = oSel.options[oSel.selectedIndex].text;
theTip.style.visibility = "visible";
}
function hideTip() {
document.getElementById("spnTip").style.visibility = "hidden";
}
</script>
----------------------------------------------------fin------------------------------------------
<form id="form1" runat="server">
<div>

<asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="SqlDataSource1" --------------la agregas esto a tu drop------ onMouseOver="showTip(this)" onMouseOut="hideTip()"---------------fin-------------

DataTextField="pai_descri" DataValueField="pai_keypai" Width="90px" EnableTheming="True" Font-Overline="True" Font-Strikeout="False" Font-Underline="False" >

</asp:DropDownList><asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:odsistemaConnectionString %>"
SelectCommand="SELECT [pai_keypai], [pai_descri] FROM [gnpais] ORDER BY [pai_descri]">

</asp:SqlDataSource>
--------------------para que tome las posiciones---------------------------
<span id="spnTip"
style="position:absolute;visibility:hidden;backgro und:lightyellow;
border:1px solid gray;padding:2px;font-size:8pt;font-family:Verdana;"
onMouseOut="hideTip()"></span>
----------------------------------------------------------fin--------------------------------------------------------
</div>
</form>
</body></html>





talvez les sirva ok