0

I am getting the error "Object doesn't support this property or method" in javascript.

I took some original code by, Paul Da Silva, and modified it. I am changing from a datePicker into a timePicker. I have renamed some fields and functions, and am still debugging it. But I did something wrong / broke something in the process. I ran it thru jLint and fixed some of the minor issues. I am stumped, can someone help?

The error occurs on the following line

this.bindMethodsToObj("show", "hide", "hideIfClickOutside", "keydownHandler", "selectTime");

but the functions: "bindMethodsToObj", "show", "hide", "hideIfClickOutside", "keydownHandler", "selectTime" all exist?

Line 534:

bindMethodsToObj: function () {
    var i = 0;
    for (i = 0; i < arguments.length; i++) {
        this[arguments[i]] = this.bindToObj(this[arguments[i]]);
    }
},

The test html page is at: http://www.gleneck.com/tv/_vhslibr14/jtpicker/jtpicker_test.htm

the javascript is at: www.gleneck.com/tv/_vhslibr14/jtpicker/jquery.jtpicker.js

I am stumped, can someone help?

1
  • Chrome's debugger reveals a little more information: Object #<a jtPicker> has no method 'bindMethodsToObj' Commented Jan 19, 2011 at 5:57

2 Answers 2

1

In your JavaScript file, I think that line 88:

jtPicker.R_o_w_type = {

... should probably look like:

jtPicker.prototype = {

so that it actually adds the methods to the function.

It looks like there's some other stuff to figure out, but that should correct your issue.

Sign up to request clarification or add additional context in comments.

Comments

0

Line 88 of your jquery.jtpicker.js needs to be changed from:

jtPicker.R_o_w_type = {

to:

jtPicker.prototype = {

The prototype method is how javascript knows to add those functions to your object. It doesn't know what to do with "R_o_w_type"

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.