jslider icon indicating copy to clipboard operation
jslider copied to clipboard

Got error "TypeError: Cannot call method 'split' of undefined"

Open jamesguitar3 opened this issue 12 years ago • 15 comments

Hi, First of all, this seem to be a great tool. Thanks for your work. But, I got an error "TypeError: Cannot call method 'split' of undefined", whenever I try to use it. Is there anything I missed? I am using jQuery 1.7.1, and UI 1.8.18. Thank you.

jamesguitar3 avatar Feb 29 '12 01:02 jamesguitar3

Would be nice, if you could send an example where this error happend.

egorkhmelev avatar Feb 29 '12 17:02 egorkhmelev

Element with ID should be "input" tag, because slider basically is input

egorkhmelev avatar Feb 29 '12 17:02 egorkhmelev

Oops, I actually got the error in the other jQuery addon, DateTimePicker. Whenever I clicked on datetimepicker element, it throws me the error, but only when I reference the jslider in the page. Conflict?

On Wed, Feb 29, 2012 at 11:19 AM, Egor Khmelev < [email protected]

wrote:

Element with ID should be "input" tag, because slider basically is input


Reply to this email directly or view it on GitHub: https://github.com/hmelyoff/jslider/issues/7#issuecomment-4242138

Sincerely,

James Liu [email protected]

jamesguitar3 avatar Feb 29 '12 17:02 jamesguitar3

I need an example to reproduce this error

egorkhmelev avatar Feb 29 '12 18:02 egorkhmelev

You can use the same example I sent earlier ( also attached here just in case), and below is the information and download link for the DateTimePicker addon.

http://trentrichardson.com/examples/timepicker/

Thank you.

On Wed, Feb 29, 2012 at 12:00 PM, Egor Khmelev < [email protected]

wrote:

I need an example to reproduce this error


Reply to this email directly or view it on GitHub: https://github.com/hmelyoff/jslider/issues/7#issuecomment-4243025

Sincerely,

James Liu [email protected]

jamesguitar3 avatar Feb 29 '12 18:02 jamesguitar3

Attachments doesn't work on github. so please send me whole example with scripts and styles included, because its hard to download all the scripts that your example requires.

egorkhmelev avatar Feb 29 '12 18:02 egorkhmelev

Sorry, I packaged everything in the attachment and also sent out your gmail this time. I also attached a couple screenshots here. And you should see two errors below:

  1. Uncaught ReferenceError: slider is not defined --> It seems the custom slider cannot find slider reference.
  2. Uncaught TypeError: Cannot call method 'split' of undefined --> you can reproduce this error by clicking either Start Date or End Date field.

Thank you.

[image: Inline image 1]

[image: Inline image 2]

On Wed, Feb 29, 2012 at 12:06 PM, Egor Khmelev < [email protected]

wrote:

Attachments doesn't work on github. so please send me whole example with scripts and styles included, because its hard to download all the scripts that your example requires.


Reply to this email directly or view it on GitHub: https://github.com/hmelyoff/jslider/issues/7#issuecomment-4243152

Sincerely,

James Liu [email protected]

jamesguitar3 avatar Feb 29 '12 18:02 jamesguitar3

Yes, this is a bug. Fast fix for you would be add value attribute with initial slider value to both inputs, and add empty hash to slider initialization, like this .slider({})

egorkhmelev avatar Feb 29 '12 18:02 egorkhmelev

It does resolve the 1st issue, but the slider still doesn't work. I cannot move the pointer in the slide. Any idea about the issue 2? Appreciate your help again.

On Wed, Feb 29, 2012 at 12:45 PM, Egor Khmelev < [email protected]

wrote:

Yes, this is a bug. Fast fix for you would be add value attribute with initial slider value to both inputs, and add empty hash to slider initialization, like this .slider({})


Reply to this email directly or view it on GitHub: https://github.com/hmelyoff/jslider/issues/7#issuecomment-4243908

Sincerely,

James Liu [email protected]

jamesguitar3 avatar Feb 29 '12 19:02 jamesguitar3

jesus, just spent 30minutes beating my head on the wall. Anyway we can get this note up on http://egorkhmelev.github.com/jslider/ ?

drKnoxy avatar May 02 '12 18:05 drKnoxy

To fix the bug, i had to do like that : -> make the slider an input -> set the type to "slider" -> add a value (even 0 or what you want) For example : <input /> won't work correctly <input type="slider"/> same <input type="slider" value="5" /> WORKS !

gjuchault avatar May 05 '12 20:05 gjuchault

I have having the exact same problem. This is my input: I'm also using a datepicker, but I've remove it and the error persists.

goncalvesjoao avatar Dec 01 '12 14:12 goncalvesjoao

Same.

seb-thomas avatar Feb 22 '13 16:02 seb-thomas

Christ. Was actually because of this: https://github.com/egorkhmelev/jslider/issues/53

seb-thomas avatar Feb 22 '13 16:02 seb-thomas

You can use <input type="slider" value="5;6" id="wslider"/> note the semicolon ;

hexicle avatar Aug 13 '13 04:08 hexicle