tooltips?
tooltips?
Is it possible to configure something so that when users scroll over a word in a topic (an acronym, for example) a tooptip containing a brief definiton will display? I thought maybe I could do this with glossary items but I don't see a way to do it so they don't have to click on the word. I tried to find an answer to this in the help files and in this forum but so far haven't found anything.
Thanks!
Sharon
Thanks!
Sharon
Re: tooltips?
You inadvertently provided your own answer.
<acronym title="MyTooltip">MyWord</acronym>
Then you can add styles for a > acronym in your css style sheet.
Good luck,
Leon
<acronym title="MyTooltip">MyWord</acronym>
Then you can add styles for a > acronym in your css style sheet.
Good luck,
Leon
Re: tooltips?
Or insert this into your masterpage if you use marked glossary items:
Code: Select all
<script type="text/javascript">
<!--
window.onload = onclick2onmouseover;
function onclick2onmouseover() {
var input = 'onclick';
var output = 'onmouseover';
var numberlinks = document.links.length;
for (var counter=0;counter<numberlinks;counter++)
{
if (document.links[counter].className == "MCTextPopupSpot_Popup_0")
{
document.links[counter].parentNode.innerHTML = document.links[counter].parentNode.innerHTML.replace(input,output);
}
}
}
-->
</script>
</head>
<body>
Last edited by i-tietz on Tue Apr 12, 2011 8:16 am, edited 1 time in total.
Inge____________________________
"I need input! - Have you got input?"
"I need input! - Have you got input?"
Re: tooltips?
I'm just getting an object reference error when I try that code.i-tietz wrote:Or insert this into your masterpage if you use marked glossary items:
Re: tooltips?
I edited the code - try again with new version.
Inge____________________________
"I need input! - Have you got input?"
"I need input! - Have you got input?"
-
Craig.Prichard
- Propeller Head
- Posts: 62
- Joined: Sat Dec 10, 2005 8:06 pm
- Location: Calgary, AB Canada
Re: tooltips?
I've taken the original code, which only supported onmouseover() for glossary terms, and expanded it to work for any number of dropdowns, expanding text, and togglers in a topic.
Enjoy.
Code: Select all
<script type="text/javascript">/*<![CDATA[*/
window.onload = onclick2onmouseover;
function onclick2onmouseover() {
var input = 'onclick';
var output = 'onmouseover';
for (i=0;i<document.links.length;i++) {
// alert(document.links[i].className);
//glossary entries
if (document.links[i].className.indexOf("MCTextPopupSpot_") !=-1) {
document.links[i].parentNode.innerHTML = document.links[i].parentNode.innerHTML.replace(input,output); }
//dropdowns
if (document.links[i].className.indexOf("MCDropDownHotSpot_") !=-1) {
document.links[i].parentNode.innerHTML = document.links[i].parentNode.innerHTML.replace(input,output); }
//expanding
if (document.links[i].className.indexOf("MCExpandingHead_") !=-1) {
document.links[i].parentNode.innerHTML = document.links[i].parentNode.innerHTML.replace(input,output); }
//togglers
if (document.links[i].className.indexOf("toggler_") !=-1) {
document.links[i].parentNode.innerHTML = document.links[i].parentNode.innerHTML.replace(input,output); }
}
}/*]]>*/
</script>
Craig Prichard
craig.prichard@gmail.com
craig.prichard@gmail.com
Re: tooltips?
This only works for v7. I'd suggest removing the '_' off the end of each class name, and it'll work in v6 and v7.Craig.Prichard wrote:I've taken the original code, which only supported onmouseover() for glossary terms, and expanded it to work for any number of dropdowns, expanding text, and togglers in a topic.
However, after a minute or two of testing, I found this quite annoying; because the glossary will pop-up on a mouseover, but you then have to click to get rid of it.
That means you have to be careful where you move your mouse across the page, which for me makes it much more more of an inconvenience than it is worth.
Really, you'd want the glossary pop-up to disappear when you move the mouse off the term.
Re: tooltips?
Although this code doesn't generate an error any more, it still doesn't seem to work.i-tietz wrote:I edited the code - try again with new version.
Looking at your code, it is looking for a tag with a class MCTextPopupSpot_Popup_0 ; but that class doesn't exist in my output - when generated using either v6 or v7.
My glossary pop-ups have a class of MCTextPopupSpot_0. If I change your code to match this, it seems to work in FireFox 4 but not for IE9. Also, that class is only valid for Flare v7, and wouldn't work for v6.
Craig's code seems to work though - and you can remove the elements you don't want to pop-up.
-
Craig.Prichard
- Propeller Head
- Posts: 62
- Joined: Sat Dec 10, 2005 8:06 pm
- Location: Calgary, AB Canada
Re: tooltips?
Good catch.Dave Lee wrote:This only works for v7. I'd suggest removing the '_' off the end of each class name, and it'll work in v6 and v7.
Yes, it's annoying. Yes, random mouse movement will frustrate the user.Dave Lee wrote:However, after a minute or two of testing, I found this quite annoying; because the glossary will pop-up on a mouseover, but you then have to click to get rid of it. That means you have to be careful where you move your mouse across the page, which for me makes it much more more of an inconvenience than it is worth.
I agree but it's beyond the scope of my skills to make the more significant modification of replacingDave Lee wrote:Really, you'd want the glossary pop-up to disappear when you move the mouse off the term.
Code: Select all
onclick="FMCPopup( event, this );Code: Select all
onmouseover="FMCPopupThumbnail_Onmouseover( event, this )Any takers?
Sidebar: my code is bloated with four (4) "if" statements because I couldn't get ORing to work to combine them. I know the code can be refactored and welcome anyone's success at doing so and posting here. Thank you.
Craig Prichard
craig.prichard@gmail.com
craig.prichard@gmail.com
-
Craig.Prichard
- Propeller Head
- Posts: 62
- Joined: Sat Dec 10, 2005 8:06 pm
- Location: Calgary, AB Canada
Re: tooltips?
Instead of comparing against an exact string match, my code looks to see if the substring MCTextPopupSpot is part of the classname....it is looking for a tag with a class MCTextPopupSpot_Popup_0...
I'm running IE8 in IE7-compatibility mode (my clients' limitation, not mine) so I can't test for IE9....it seems to work in FireFox 4 but not for IE9...
I have removed the underscores for compatibility with Flare v6 but have not modified the code posted in this thread. I'm hoping to incorporate a refactored version with a single compound "if" and then I'll post the revised code....that class is only valid for Flare v7, and wouldn't work for v6.
Craig Prichard
craig.prichard@gmail.com
craig.prichard@gmail.com
Re: tooltips?
My second post was about i-tietz's code; yours worked fine in IE9.Craig.Prichard wrote:I'm running IE8 in IE7-compatibility mode (my clients' limitation, not mine) so I can't test for IE9....it seems to work in FireFox 4 but not for IE9...
Re: tooltips?
IE 9 is available for about 4 weeks now ... experience tells me to not use it before 6 months have passed and the third fix has been published ...
Adjusting anything to make it run in the current version could well explode right into your face in a couple of months.
Adjusting anything to make it run in the current version could well explode right into your face in a couple of months.
Inge____________________________
"I need input! - Have you got input?"
"I need input! - Have you got input?"
Re: tooltips?
Fair enough, but regardless of browser, your code still didn't work for me anyway, as it's looking for a specific class name that doesn't exist in my output. That'd suggest the generated class name might vary between Flare versions or settings, so it'd need to use Craig's approach of using a substring of the class name.i-tietz wrote:IE 9 is available for about 4 weeks now ... experience tells me to not use it before 6 months have passed and the third fix has been published ...
Adjusting anything to make it run in the current version could well explode right into your face in a couple of months.
Re: tooltips?
aha.
Sorry for not giving you the exact code for each browser in each version on each operating system and with each single interfering security setting and for each Flare version.
Won't happen again.
Sorry for not giving you the exact code for each browser in each version on each operating system and with each single interfering security setting and for each Flare version.
Won't happen again.
Inge____________________________
"I need input! - Have you got input?"
"I need input! - Have you got input?"
Re: tooltips?
Er... I'm also sorry that I wasted time trying out your code and identifying some problems.i-tietz wrote:aha.
Sorry for not giving you the exact code for each browser in each version on each operating system and with each single interfering security setting and for each Flare version.
Won't happen again.
Re: tooltips?
If I deliver code suitable for all possible situations I take money for it. For the very simple reason that it takes a lot of time - as you've obviously found out, too ...
Inge____________________________
"I need input! - Have you got input?"
"I need input! - Have you got input?"
-
RamonS
- Senior Propellus Maximus
- Posts: 4293
- Joined: Thu Feb 02, 2006 9:29 am
- Location: The Electric City
Re: tooltips?
You may need to revisit this position. Microsoft announced to release IE10 later this year.i-tietz wrote:IE 9 is available for about 4 weeks now ... experience tells me to not use it before 6 months have passed and the third fix has been published ...
Adjusting anything to make it run in the current version could well explode right into your face in a couple of months.
New Book: Creating user-friendly Online Help
Paperback http://www.amazon.com/dp/1449952038/ or https://www.createspace.com/3416509
eBook http://www.amazon.com/dp/B005XB9E3U

Paperback http://www.amazon.com/dp/1449952038/ or https://www.createspace.com/3416509
eBook http://www.amazon.com/dp/B005XB9E3U