PDA

View Full Version : Resolved Lightbox error Internet Explorer 'Class' is undefined



printman55
05-04-2010, 12:13 PM
1) Script Title: Lightbox image viewer 2.03a

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

3) Describe problem: The effect works. It is applied to the "map button" on the page middle.
http://www.kingfishercapital.com/Revamp/Charlotte_Investment_Management/Error.html
IE shows the error on page warning in the status bar. I looked at line 181 and didn't see anything wrong. Please help.
Thanks

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB6.4; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Timestamp: Tue, 4 May 2010 11:58:25 UTC


Message: 'Class' is undefined
Line: 181
Char: 1
Code: 0
URI: http://www.kingfishercapital.com/Revamp/js/effects.js

jscheuer1
05-04-2010, 02:21 PM
Here in your source code:


<script type="text/javascript" src="../js/effects.js"></script>
<script type="text/javascript" src="../js/prototype.js"></script>
<script type="text/javascript" src="../js/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="../js/lightbox.js"></script>

Get rid of the highlighted line. The effects script is loaded by scriptaculous anyway and cannot be loaded without error until prototype has loaded. If you look at the demo page, you will see:


Step 1: Insert the below code in the HEAD section of your page:

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

It has no separate script tag for effects as your page does.

printman55
05-04-2010, 04:27 PM
That was it!
Many thanks, John