Reply
Old 10-07-2003, 08:17 PM ToolTip
WaHoOoO!'s Avatar
Mentally Unstable Tugboat Captain

Posts: 797
Name: Chad
Location: /usr/bin/perl
I have a series of items in a list, and I want to make each one have a tooltip pop up when you click on the item. How can I do this? Thanks.
__________________
He's baaaaaaaack....
WaHoOoO! is offline
Reply With Quote
View Public Profile Visit WaHoOoO!'s homepage!
 
When You Register, These Ads Go Away!
Old 10-07-2003, 08:25 PM
Christopher's Avatar
Iced Cap

Latest Blog Post:
PHP and Unicode with UTF-8
Posts: 3,111
Location: Toronto, Ontario
I think you can add a title tag to just about anything?

Code:
<li title="item1">test</li>
Christopher is offline
Reply With Quote
View Public Profile Visit Christopher's homepage!
 
Old 10-07-2003, 08:34 PM
WaHoOoO!'s Avatar
Mentally Unstable Tugboat Captain

Posts: 797
Name: Chad
Location: /usr/bin/perl
Not exactly what I wanted. I dont want it to automatically come if you hover. I want ToolTip so when you click it appears. Good try though.
__________________
He's baaaaaaaack....
WaHoOoO! is offline
Reply With Quote
View Public Profile Visit WaHoOoO!'s homepage!
 
Old 10-07-2003, 11:02 PM
Christopher's Avatar
Iced Cap

Latest Blog Post:
PHP and Unicode with UTF-8
Posts: 3,111
Location: Toronto, Ontario
Oh, click You might want to take a look at some DHTML effects. Thats the only way you'll achieve it, I think.
Christopher is offline
Reply With Quote
View Public Profile Visit Christopher's homepage!
 
Old 10-09-2003, 07:21 PM
WaHoOoO!'s Avatar
Mentally Unstable Tugboat Captain

Posts: 797
Name: Chad
Location: /usr/bin/perl
Ok, a bit of an update. I have the script in place, and it runs, only with one problem. I want the tooltip box to stay open longer than it does (10seconds?) I want it to stay open until they do move their mouse away. The script is as follows:

Quote:
<script>

if (!document.layers&&!document.all&&!document.getEle mentById)
event="test"
function showtip(current,e,text){

if (document.all||document.getElementById){
thetitle=text.split('<br>')
if (thetitle.length>1){
thetitles=''
for (i=0;i<thetitle.length;i++)
thetitles+=thetitle[i]
current.title=thetitles
}
else
current.title=text
}


else if (document.layers){
document.tooltip.document.write('<layer bgColor="white" style="border:1px solid black;font-size:12px;">'+text+'</layer>')
document.tooltip.document.close()
document.tooltip.left=e.pageX+5
document.tooltip.top=e.pageY+5
document.tooltip.visibility="show"
}
}
function hidetip(){
if (document.layers)
document.tooltip.visibility="hidden"
}

</script>
Here is the div line of coding:

Quote:
<div id="tooltip" style="position:absolute;visibility:hidden"></div>
And here is an example of one of the lines of text that I want the tooltip to open on (yes, I know there is no "href", I wanted it that way).

Quote:
<a onMouseover="showtip(this,event,'Web Master :: A beginning course in web design. Each nine weeks focuses on a different aspect. ')" onMouseout="hidetip()">Web Master</a>
Like I said, it works fine, I just want the box to remain open until they do mouse away. Thanks in advance.
__________________
He's baaaaaaaack....
WaHoOoO! is offline
Reply With Quote
View Public Profile Visit WaHoOoO!'s homepage!
 
Reply     « Reply to ToolTip
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.18501 seconds with 12 queries