SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Apr 2007
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Error in FireFox: document.getElementById (imageid) has no properties

    Hi,
    I have an image slideshow that works in IE, but not FireFox. In the FireFox Error Console, it says

    document.getElementById(imageid) has no properties
    Source file: http://www.2gstudio.com/kr/amore/includes/blendtrans.js
    Line: 44
    The line in blendtrans.js that this is referring to is:

    Code:
    	document.getElementById(divid).style.backgroundImage = "url(" + document.getElementById(imageid).src + ")";
    The page that has the slideshow is http://www.2gstudio.com/kr/amore/default.html

    The slideshow rotates great in IE, but in FireFox it just stays on the first image.

    I don't have a lot of experience in JS, so any information as to why it fails in FireFox would be much appreciated.

    Thank you!

  2. #2
    SitePoint Guru
    Join Date
    Sep 2006
    Posts
    731
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    document.getElementById(imageid) has no properties
    In this line: blendimage('1', 'img1' ,new_image,1300)

    'img1' needs to be the id attribute of the target image, not its name attribute. Also you have the id of the image set to '1', but IDs are not permitted to start with a digit.
    Tab-indentation is a crime against humanity.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •