PDA

View Full Version : error on page with ddimgtooltip.js



microweb
08-11-2010, 06:54 PM
1) Script Title: Image w/ description tooltip v2.0

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/imagetooltip.htm

3) Describe problem: I've implemented this script and it works find in FireFox, but when I view the page (http://www.microwebnow.com/projects/tree-locators/bulk-materials.asp) in IE8 it shows "Done but with errors on page"

I can see the script working in IE8 on your site without the errors. Can you help identify why this error is occurring.

There are some links that we didn't put the correct path to the image, so it shows up with the red x, but even with an image there it is causing the error. We also put your .js and .css files in a js subdirectory and changed the path accordingly on our page.

Thanks

jscheuer1
08-12-2010, 01:35 AM
That error also occurs in Firefox for the page. Firefox is just less aggressive in reporting errors. In neither browser does it prevent the the tooltip script from working.

The error is not with the script itself, rather a conflict between prototype.js and jquery.min.js.

You don't appear to be using any of this though:


<link href="css/lightbox.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/prototype.js"></script>
<script type="text/javascript" src="js/scriptaculous.js?load=effects,builder"></script>
<script type="text/javascript" src="js/lightbox.js"></script>

So, if you remove all that from the page, the error will go away.

If you do need that for some reason, you may keep it by doing things a little differently. Change:


<link href="css/lightbox.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/prototype.js"></script>
<script type="text/javascript" src="js/scriptaculous.js?load=effects,builder"></script>
<script type="text/javascript" src="js/lightbox.js"></script>
<script language="JavaScript" src="js/mm_menu.js"></script>
<!-- InstanceBeginEditable name="head" -->

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>

<link rel="stylesheet" type="text/css" href="js/ddimgtooltip.css" />

<script type="text/javascript" src="js/ddimgtooltip.js">

/***********************************************
* Image w/ description tooltip v2.0- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
***********************************************/

</script>

to:


<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="js/ddimgtooltip.css" />

<script type="text/javascript" src="js/ddimgtooltip.js">

/***********************************************
* Image w/ description tooltip v2.0- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
***********************************************/

</script>
<script type="text/javascript">
jQuery.noConflict();
</script>
<link href="css/lightbox.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/prototype.js"></script>
<script type="text/javascript" src="js/scriptaculous.js?load=effects,builder"></script>
<script type="text/javascript" src="js/lightbox.js"></script>
<script language="JavaScript" src="js/mm_menu.js"></script>
<!-- InstanceBeginEditable name="head" -->