www.webdeveloper.com
Results 1 to 4 of 4

Thread: new object from user-defined class in IE8

  1. #1
    Join Date
    Mar 2007
    Posts
    23

    new object from user-defined class in IE8

    Hi there,

    I've been writing a slideshow script that I've had working perfectly on my mac in Chrome and Safari, however I went to look at it in IE8 and lo and behold it falls over. It says 'object doesn't support this property or method' in relation to the new SlideShow line in the main() function.

    I suspect I've missed something incredibly basic, but after a quick google I'm none the wiser.

    Thanks for your help. The script is attached.
    Attached Files Attached Files

  2. #2
    Join Date
    May 2003
    Location
    Between Baltimore and DC
    Posts
    3,579
    getElementsByClassName is not supported in all browsers.

    Eric

  3. #3
    Join Date
    Mar 2007
    Posts
    23
    Thank you, that would never have occurred to me. I'll give that a go.

  4. #4
    Join Date
    Mar 2007
    Posts
    23
    My next question is, rather than rewriting the code, would this strategy work, can anyone point me in the right direction for adding the method for the purposes of IE?

    I was thinking along the lines of

    Code:
    if(!document.getElementsByClassName)
       {//create a prototype for getElementsByClassName
       }
    My questions are
    • Is this a viable approach?
    • If so, what class should the prototype belong to?
    • How do I actually do it? :-/

      Under normal circumstances, i'd research it properly, but I'm in a hurry so expert guidance would be gratefully received.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles