teena2
asked on
to create tooltip
i wish that whenever i select a value in a list box the complete text of that option should be available as tooltip as due to size i am not able to show the complete text
<!-- Begin
function showtip2(current,e,text){
if (document.all&&document.re adyState== "complete" ){
document.all.tooltip2.inne rHTML=text
document.all.tooltip2.styl e.pixelLef t=event.cl ientX+docu ment.body. scrollLeft +10
document.all.tooltip2.styl e.pixelTop =event.cli entY+docum ent.body.s crollTop+1 0
document.all.tooltip2.styl e.visibili ty="visibl e"
}
else if (document.layers){
document.tooltip2.document .nstip.doc ument.writ e('<b>'+te xt+'</b>')
document.tooltip2.document .nstip.doc ument.clos e()
document.tooltip2.document .nstip.lef t=0
currentscroll=setInterval( "scrolltip ()",100)
document.tooltip2.left=e.p ageX+10
document.tooltip2.top=e.pa geY+10
document.tooltip2.visibili ty="show"
}
}
function hidetip2(){
if (document.all)
document.all.tooltip2.styl e.visibili ty="hidden "
else if (document.layers){
clearInterval(currentscrol l)
document.tooltip2.visibili ty="hidden "
}
}
function test(this)
{
t1.onMouseover="showtip2(t his,event, 'Be sure to check out our other JavaScripts!');"
t1.onMouseout="hidetip2(); "
t1.STYLE="cursor: hand"
}
// End -->
</script>
</HEAD>
<BODY>
<div id="tooltip2" style="position:absolute;v isibility: hidden;cli p:rect(0 250 50 0);width:350px;background- color:gold ;z-index:1 0"></div>
<input type=button name="t" value="t" onMouseover="showtip2(this ,event,'he llo');" onMouseout="hidetip2();" STYLE="cursor: hand">
<select name="t1" id="t1" size=2 onclick="test(this);">
<option >teena</option>
<option>ritish</option>
</select>
this text shows tooltip but that is partly hidden behind the list box
if not possible then plz tell me how to add horizontal scrollbar in list box
plz reply soon
<!-- Begin
function showtip2(current,e,text){
if (document.all&&document.re
document.all.tooltip2.inne
document.all.tooltip2.styl
document.all.tooltip2.styl
document.all.tooltip2.styl
}
else if (document.layers){
document.tooltip2.document
document.tooltip2.document
document.tooltip2.document
currentscroll=setInterval(
document.tooltip2.left=e.p
document.tooltip2.top=e.pa
document.tooltip2.visibili
}
}
function hidetip2(){
if (document.all)
document.all.tooltip2.styl
else if (document.layers){
clearInterval(currentscrol
document.tooltip2.visibili
}
}
function test(this)
{
t1.onMouseover="showtip2(t
t1.onMouseout="hidetip2();
t1.STYLE="cursor: hand"
}
// End -->
</script>
</HEAD>
<BODY>
<div id="tooltip2" style="position:absolute;v
<input type=button name="t" value="t" onMouseover="showtip2(this
<select name="t1" id="t1" size=2 onclick="test(this);">
<option >teena</option>
<option>ritish</option>
</select>
this text shows tooltip but that is partly hidden behind the list box
if not possible then plz tell me how to add horizontal scrollbar in list box
plz reply soon
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://www.faqts.com/knowledge_base/view.phtml/aid/1068/fid/129
Which sort of suggests that doing a
function test(t1) {
document.getElementById('t ').title=t 1.options[ t1.selecte dIndex].te xt;
}
<input type=button id="t"
name="t" value="t">
<select name="t1" id="t1" size=2 onclick="test(this);">
is a smarter solution
function test(t1) {
document.getElementById('t
}
<input type=button id="t"
name="t" value="t">
<select name="t1" id="t1" size=2 onclick="test(this);">
is a smarter solution
Hii,
take a look at the following link...it'S one of the best..and easy to use.
http://www.bosrup.com/web/overlib/
This may be of some help.
regards
fargo
take a look at the following link...it'S one of the best..and easy to use.
http://www.bosrup.com/web/overlib/
This may be of some help.
regards
fargo
He does however have the same problem if one reads the FAQ
"Why do form elements show up on top of the popups? They sort of bleed.
This is a browser issue that we can't do much about :(. The only work around would be to place the form elements themselves in layers and hide while showing the popups"
"Why do form elements show up on top of the popups? They sort of bleed.
This is a browser issue that we can't do much about :(. The only work around would be to place the form elements themselves in layers and hide while showing the popups"
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:
Accept: mplungjan {http:#8477933}
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
jAy
EE Cleanup Volunteer
I will leave the following recommendation for this question in the Cleanup topic area:
Accept: mplungjan {http:#8477933}
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
jAy
EE Cleanup Volunteer