Web Analytics Made Easy -
StatCounter IE issue with image arrays - CodingForum

Announcement

Collapse
No announcement yet.

IE issue with image arrays

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • IE issue with image arrays

    Hello coders,

    Hope you can help with this browser problem I'm experiencing. I have a site that works perfectly in Firefox and Safari, but not IE.

    I have developed a single html page javascript website template for artists, photographers, etc. that is ideal for clicking through their work and uses only one page to access all the image content of the site (all images are accessed by arrays organized by their section). Every nav control on the site calls a javascript function. For each content section there are array variables that contain all the images for that section and each image is loaded using the function next();. Next(); loads the next image in the array into the imgFrame ID (photo canvas). When the end of the section's array is reached it loads the next section array and resets the array count variable to zero. The problem is that on some versions of IE next(); does not work. It only displays an empty box with a white border rather than the next image in the array as it should. An example is (please view source):

    http://www.salfusaro.com

    Click on the arrows in the botttom right corner. IE on PC is the problematic one (assuming version 6.0?). However it worked on my IE version at work with a very fast T1 connection. By working I mean you should be able to click on the bottom right advance arrow and click through all 15 'The Gates' images and then automatically go to 'Venice'. Any help or experience that any of you out there could impart would be very appreciated. As far as I can tell the problem is on line 72:

    document.getElementById('imgFrame').src = array[thisPic];

    IE does not seem to like loading an image based on the thisPic variable. It works fine when using the menuToggle(); function because the next image is called using an integer '0'. Just my 2 cents on the line 72 conjecture, really hoping some experts out there could shed some light on why this doesn't work in IE yet is very fast and works as intended in Mozilla browsers.

    Thanks very much...
    Cameron

  • #2
    If infact your array is named array IE might be having a problem with it because it thinks its a reserved word. Change your image array name to something else.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

    Comment


    • #3
      that was it! thanks very much. IE does not like it if you name an array variable inside a function 'array'. thanks again.

      Comment

      Working...
      X