Log in

View Full Version : Mouse over text to image



BVFrontpage
01-18-2013, 03:25 AM
I am using Front Page 2003. I want to mouse over some text and have it bring up an image. Any help is greatly appreciated!

jscheuer1
01-19-2013, 07:02 PM
Installing scripts using FP can be tricky, but it's not impossible. What kind of action are you looking for?

Like a gallery? (triggers can be text or images):

http://www.dynamicdrive.com/dynamicindex4/thumbnail2.htm

Or like a tooltip? (descriptions are optional):

http://www.dynamicdrive.com/dynamicindex4/imagetooltip.htm

bernie1227
01-19-2013, 11:28 PM
As best as I can tell John, he is looking for something more simple in nature:
http://jsfiddle.net/bernie1227/8zuvy/

jscheuer1
01-20-2013, 04:04 AM
Doesn't work. I think you chose the wrong library. If I switch it from MooTools to jQuery, it does work. But for something simple, no library should be required. Something like:


<!DOCTYPE html>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
#myimage {
visibility: hidden;
display: block;
}
</style>
</head>
<body>
<span id="trigger">Text</span>
<img id="myimage" src="earth.jpg" alt="original image" title="">
<script type="text/javascript">
document.getElementById('trigger').onmouseover = function(){
document.getElementById('myimage').style.visibility = 'visible';
}
document.getElementById('trigger').onmouseout = function(){
document.getElementById('myimage').style.visibility = 'hidden';
};
</script>
</body>
</html>

Demo:

http://home.comcast.net/~jscheuer1/side/tidbits/mouseimage.htm

But one of the two scripts I mentioned here:

http://www.dynamicdrive.com/forums/showthread.php?72654-Mouse-over-text-to-image&p=289597#post289597

might still be a better fit. It all depends upon what they ultimately want to do.

Oh, and Bernie - Thanks for your contribution so far to this thread. But please don't turn this into a discussion about possibilities or comments on my code or your code or my comments on your code. Basically Please wait until the OP responds.

BVFrontpage
01-20-2013, 10:14 PM
I found that tooltip a day after I posted this topic but I can not for the life of me get it to work.

jscheuer1
01-20-2013, 10:55 PM
What seems to be the problem? Could you put up a live demo? I mean it obviously doesn't have to work, just do your best in following the instructions and upload the result to the web and give us a link to it. I'm sure we can advise you on how to get it working.