开发者

Jquery / Javascript error: Object doesn't support this property or method

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

thi开发者_如何转开发s.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?


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.


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"

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜