PDA

View Full Version : Help needed with DHTML Tip Message



georgee
09-04-2010, 02:03 PM
1) Script Title: DHTML Tip Message

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex5/popinfo.htm

3) Describe problem: When hovering over a link in Internet Explorer the tool tip message always floats to the bottom of the page. In Firefox it's fine. This is not practical at all. My url is www.family-guy-world.com/episode-guide/season-1

ddadmin
09-04-2010, 05:53 PM
Hmm float to the bottom how, as in it becomes obscured? I just checked your page in IE8, and the toolip appears fine for me.

jscheuer1
09-04-2010, 07:49 PM
Actually there is a problem. This script is so old that its demo page in the distribution archive is written in quirks mode, and without quirks behavior, there are some non-fatal errors, none of which are part of this problem.

The first tip is fine. As one scrolls down the page though, things get increasingly bad in IE 8. It's as though the script is adding the scrollTop twice, or some other miscalculation for the top position of the tip, like getting the scrollTop from the wrong property of the page. This happens even on the demo page for this script once a valid DOCTYPE is added. Since it isn't standards alone that's throwing things off (possibly the script didn't know about IE 8 and so considers it not IE 7, more like IE 6 or 5.5, nothing could be further from the truth), as a stop gap fix you can force IE 7 compatibility (add the highlighted):


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<link rel="alternate" type="application/rss+xml" href="/feed/" title="Family Guy World | RSS Feed">

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" >
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<script language="JavaScript1.2" src="/hovertitle/main.js"type="text/javascript"></script>




<style type="text/css">
body {
background:url('/brandnewfgw/familyguyworld.jpg');
background-repeat: no-repeat;
background-color: #00D0FF;

This is enough to get IE 8 to behave well with this script.

However, since it limits you from taking full advantage of IE 8's advanced features for the rest of your page*, I would recommend getting a more up to date tooltip script, like:

http://flowplayer.org/tools/tooltip/index.html

I believe it's free, though I'm not certain. Much nicer than what you're using at the moment, and very likely will not have any problems with modern browsers.



*If this isn't a consideration, using the compatibility tag is an acceptable solution. Better still would be to set the page for IE 7 compatibility on the server side.

georgee
09-04-2010, 09:51 PM
Thanks John, you understood me and your answer was detailed. :)