Text Popup Effects
-
doc_guy
- Propellus Maximus
- Posts: 1979
- Joined: Tue Nov 28, 2006 11:18 am
- Location: Crossroads of the West
- Contact:
Text Popup Effects
Hey all,
Can you let me know if there is a way to set Text popups to appear as a hover action, rather than a click action?
Thanks!
-Paul
Can you let me know if there is a way to set Text popups to appear as a hover action, rather than a click action?
Thanks!
-Paul
Re: Text Popup Effects
I don't have Flare open at the moment, so I don't remember if it automatically adds a Javascript event to the <a href...> link. I don't think it does, so the only options I can think of is to A) create your own link with custom inline Javascript code to open a topic in a new window on a mouseover event, or B) modify the Flare Javascript file to use onmouseover instead of onclick. Depending on how that JS file is coded, that might pass the effect to all hyperlinks or to all popup links (including glossary popups). So I think option A is your best bet.
Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
-
Craig.Prichard
- Propeller Head
- Posts: 62
- Joined: Sat Dec 10, 2005 8:06 pm
- Location: Calgary, AB Canada
Re: Text Popup Effects
Has anyone successfully implemented mouseover popups for glossary terms, i.e. on hover instead of click? Thanks.
Craig Prichard
craig.prichard@gmail.com
craig.prichard@gmail.com
Re: Text Popup Effects
No, not in a glossary. But in a current project I have a javascript in the masterpage for all topics. Amongst other things it rewrites links that contain bookmarks (e.g. topic.htm#bookmarkone). That javascript is triggered by the "onload" event.Craig.Prichard wrote:Has anyone successfully implemented mouseover popups for glossary terms, i.e. on hover instead of click? Thanks.
Something like that should work in the glossary as well as in a topic with a glossary term. Just stuff it in to the relevant masterpage.
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: Text Popup Effects
Inge,
Can you share that javascript with us? Thank you.
Can you share that javascript with us? Thank you.
Craig Prichard
craig.prichard@gmail.com
craig.prichard@gmail.com
Re: Text Popup Effects
It's a coop of javascript, masterpage, stylesheet and templates ... I need to make a dummy project out of it, before I can attach it. Takes a bit of time.Craig.Prichard wrote:Can you share that javascript with us? Thank you.
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: Text Popup Effects
goodness ... *banging the head on the table* ... you only need the rewriting-the-link-stuff ...
Please note:
This works for Internet Explorer (because of the "document.all"), not in Mozilla ... Chrome: no idea. (We're producing HTML Help, so IE is good enough) There are other methods that work for Mozilla, but I didn't have to find out cos' we don't need it.
The script:
1. looks for links that include a bookmark, because only those links will be changed (for reasons you don't see here, but are in the rest of the masterpage/script/stylesheet)
2. drops the "href" in those links and inserts an "onclick"
To use this script:
You should go and have a look at the source code of the glossary. You can use the links inside the DropDownHeads - find them them via their class.
As you see there's quite a bit of adapting to do ...
Please note:
This works for Internet Explorer (because of the "document.all"), not in Mozilla ... Chrome: no idea. (We're producing HTML Help, so IE is good enough) There are other methods that work for Mozilla, but I didn't have to find out cos' we don't need it.
The script:
1. looks for links that include a bookmark, because only those links will be changed (for reasons you don't see here, but are in the rest of the masterpage/script/stylesheet)
2. drops the "href" in those links and inserts an "onclick"
To use this script:
You should go and have a look at the source code of the glossary. You can use the links inside the DropDownHeads - find them them via their class.
Code: Select all
<script type="text/javascript">
<!--
window.onload = adaptLinks;
window.onresize = adaptLinks;
function adaptLinks()
{
if (document.all)
{
// parse document URL to compare with link targets
var address = document.URL;
var hasbookmark = address.split("#");
var wholepath = hasbookmark[0].split("chm::");
var pathinchm = wholepath[1];
var path = hasbookmark[0].split("/");
var countelements = path.length;
var lastelement = countelements - 1;
var file = path[lastelement];
// Change link targets to local bookmarks
// *************************
// LOOP OVER DOCUMENT LINKS
// *************************
var aaddress = "";
var apath = "";
var alastelement = 0;
var afile = "";
var countlinks = document.links.length;
for (var countup=0;countup<countlinks;countup++)
{
// parse href of link for more information
aaddress = document.links[countup] + "";
ahasbookmark = aaddress.split("#");
// link has bookmark?
if (ahasbookmark[1] != null)
{
// bookmark in this document?
apath = ahasbookmark[0].split("/");
alastelement = apath.length - 1;
afile = apath[alastelement];
if (file == afile)
{
// delete href and insert onclick
targetnew = pathinchm + document.links[countup].hash;
newtext = "javascript:void(window.location.href = '" + targetnew + "');location.reload();";
document.links[countup].href = newtext;
}
}
}
}
}
// -->
</script>
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: Text Popup Effects
Here I have another javascript for having popups on mouseover rather than on mouseclick:
http://forums.madcapsoftware.com/viewto ... 13&t=12847
http://forums.madcapsoftware.com/viewto ... 13&t=12847
Inge____________________________
"I need input! - Have you got input?"
"I need input! - Have you got input?"
