?
Solved

Javascript cross browser issues

Posted on 2011-02-27
2
Medium Priority
?
481 Views
Last Modified: 2012-05-11
Hello,

I'm having issues with a Javascript for flipping pictures on my front page of the website.

The site looks fine in Mozilla Firefox but no in IE, Chrome or Opera etc... site is here www.nordisk-solvarme.se

The error code I get in IE:

Message: 'undefined' is null or not an object
Line: 12
Char: 388
Code: 0
URI: http://www.nordisk-solvarme.se/js/jquery.nivo.slider.pack.js
0
Comment
Question by:SvassUK
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 2

Expert Comment

by:Aazmodeus
ID: 34992269
Oh my, the code is compressed.
The error is in the plugin code. It is caused because in some part of the code (which is hard to tell, because the code is completely unreadable when compressed) it tries to get string value from attribute 'title' of some image (var name g.currentImage). The atribute is undefined, but it passes the safety check because it checks only for empty string for some reason.
I suggest you use some other plugin, or write the author of the plugin about the bug. Maybe he/she'll fix it.
...
if(g.currentImage.attr("title")!=""){
   k=g.currentImage.attr("title");
   if(k.substr(0,1)=="#")
      k=a(k).html();
...

Open in new window

0
 
LVL 84

Accepted Solution

by:
Dave Baldwin earned 2000 total points
ID: 34992295
First, you have <div id="box"> and <div id="box_inner"> defined three times.  'id's are only supposed to be used once on a page, especially when your javascript has to use the 'id' to locate an object or element.  The error message refers to a element attribute and even Firefox complains about some of your CSS.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to create an extensible mechanism for linked drop downs.
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question