Advertisement

12.21.2003 at 10:58PM PST, ID: 20832088
[x]
Attachment Details

display the full name when value is selected in dropdown on mouse over

Asked by babuvoni in JavaScript

Tags: javascript, showtip, onmouseover, display, selected

Hello,
  This is an urgent requirement, i am going to paste a piece of code.
Plz try to execute it, u will find a dropdown with two values "january" and
"februaryaasdasdasdasdasdasdasdasdas"
Now in the present code the functionality is ,a tool tip shws full value only when value is selected, NOw my problem is i shld not get htat tool tip separately instead when i select the dropdown, on mouse over of the second value "februaryaasdasdasdasdasdasdasdasdas" where i see only "februaryaasdasd.." . On mouse over the value shld expand there only ad shown that is wht i need. Hope u hve understood my problm.
thanks in advance for that
max


<html>
<head>
<STYLE>

   /*  This is for Netscape 4.0+ broswsers so that the border will display.  If you want to modify the

background color this is where you would do it for NS4.0+.  To modify the color for IE and NS6 do so

in the style tag in the div below
   */

   .ttip {border:1px solid

black;font-size:12px;layer-background-color:lightyellow;background-color:lightyellow}
  </STYLE>

<script>

//Script created by Jim Young (www.requestcode.com)
//Submitted to JavaScript Kit (http://javascriptkit.com)
//Visit http://javascriptkit.com for this script

//Set the tool tip message you want for each link here.
     var tip=new Array
           tip[0]='Visit Dynamic Drive<br> for DHTML Scripts!'
           tip[1]='Visit JavaScript Kit for Great<br> Scripts, Tutorials and Forums!'
           tip[2]='Visit Request Code for FREE JavaScripts!'
           tip[3]='Click here for some excellent<br>Java applets and tutorials'
           
     function showtip(current,e,num)
        {
      
            if(document.getElementById) // Netscape 6.0+ and Internet Explorer 5.0+
              {

            var text =

document.all["selEndMonth"].options[document.all["selEndMonth"].selectedIndex].text;            
               elm=document.getElementById("tooltip")
               elml=current
               elm.innerHTML=text
               elm.style.height=elml.style.height
               elm.style.top=parseInt(elml.offsetTop+elml.offsetHeight)
               elm.style.left=parseInt(elml.offsetLeft+elml.offsetWidth+10)
               elm.style.visibility = "visible"
              }
         
        }
function hidetip(){
if (document.layers) // Netscape 4.0+
   {
    document.tooltip.visibility="hidden"
   }
else
  {
   if(document.getElementById) // Netscape 6.0+ and Internet Explorer 5.0+
     {
      elm.style.visibility="hidden"
     }
  }
}
</script>
</head>

<body>
<div id="tooltip" style="position:absolute;visibility:hidden;border:1px solid

black;font-size:12px;layer-background-color:lightyellow;background-color:lightyellow;padding:1px"></di

v>



<select style='height: 22px; width: 130px' name="selEndMonth"

onMouseOver="javascript:showtip(this,event,'January')">
                   <option value="january"  selected>January</option>
                   <option value="february"selected>februaryaasdasdasdasdasdasdasdasdas</option>      

</select>

</body>
</html>


Start Free Trial
[+][-]12.21.2003 at 11:12PM PST, ID: 9983714

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.21.2003 at 11:52PM PST, ID: 9983797

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.21.2003 at 11:53PM PST, ID: 9983799

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.22.2003 at 12:43AM PST, ID: 9983894

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.22.2003 at 08:21AM PST, ID: 9985755

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.22.2003 at 06:53PM PST, ID: 9989121

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.22.2003 at 09:54PM PST, ID: 9989626

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.18.2004 at 12:10PM PST, ID: 10396130

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.22.2004 at 10:44AM PST, ID: 10426821

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: JavaScript
Tags: javascript, showtip, onmouseover, display, selected
Sign Up Now!
Solution Provided By: SpazMODic
Participating Experts: 3
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32