Reputation: 133
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?
Upvotes: 0
Views: 631
Reputation: 124419
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"
Upvotes: 0
Reputation: 196
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.
Upvotes: 1