PDA

View Full Version : Ajax issue in IE


alexpb86
06-17-2009, 01:32 PM
Hi there,

I'm in the process of putting together a simple folio that loads content into the top right column of the page when a link in the navigation or an image is clicked.

http://www.andrewdroog.co.uk/testing/

However, I work on a mac as websites clearly aren't my day job and after checking it on IE7 on windows last night the ajax functionality simply didn't work. Can anyone help me understand why? I've been informed IE doesn't like line 59 of the javascript, but only gives an "unknown runtime error" message. This means nothing to me as the code is just from Dynamic Drive.

There's also a little problem in FF on mac with the content jumping a little when it enters the load div?

I know there's probably other issues but I'm trying to get the basic functionality working first!

arthurakay
06-23-2009, 04:07 PM
This is a bit confusing, but here's a thought: you're JS code is missing semicolons at the end of every line. I wouldn't be surprised if that's somehow related to the issue.

According to my JS debugger in IE, the line it complains about is:

if (loadedobjects.indexOf(file)==-1){ //Check to see if this object has not already been added to page before proceeding


When IE complains about an error on line X, it usually means you have a syntax error at some point before the line throwing the error. If the missing semicolons are to blame, this is an easy fix. Since this is contained within your loadobjs() method, I would start there.