Error: Object doesn't support this property or method

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jglover45
    New Member
    • Aug 2008
    • 1

    Error: Object doesn't support this property or method

    I'm running the following javascript with no problem in FireFox:


    Code:
    var multiGallery = {
    	init: function(options){
    		this.overlay = new Element('div').setProperty('id','lbOverlay').injectInside(document.body).addEvent('click',this.close.bind(this));
    		this.gallery = new Element('div').setProperty('id','gallery').injectInside(document.body);
    		this.fx = {
    			overlay: this.overlay.effect('opacity', {duration: 250}).hide()
    		}
    	},
    In IE7 I get an error that says "Microsoft JScript runtime error: Object doesn't support this property or method" on each of the "this." statements.

    Anyone have any issues with this and have a fix for it?

    Thanks!
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    Are you using a library, e.g. jQuery?

    Can you post the rest of the code (if not too much) or a link?

    Comment

    Working...