⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Uncaught TypeError: undefined is not a function



MD Rahat Islam Khan

MD Rahat Islam Khan
  • profile picture
  • Member

Posted 08 November 2014 - 06:57 AM

i am facing some problem in grocery crud.when i try to integrate it i got and error "Uncaught TypeError: undefined is not a function on flexidgrid.js line :  17.I am using a bootstrap theme and i have attached some screenshot

 

plese help me fixing this problem

 


Amit Shah

Amit Shah
  • profile picture
  • Member

Posted 08 November 2014 - 16:17 PM

can u go on tha line and check .. as what exactly there is on that line.. if u can copy / paste the line / piece of code here - it might be possible to look & update u on the same

secondly.. check if you face the same trouble when using other theme - flexigrid also.. then theres some other issue ..that needs to be checked


MD Rahat Islam Khan

MD Rahat Islam Khan
  • profile picture
  • Member

Posted 09 November 2014 - 06:19 AM

I am using this free bootstrap admin template.and in every theme of grocery crud it is giving me error. In case of flexid grid, it is giving me undefined is not a function on line 17 

" $('.image-thumbnail').fancybox({ "

 

one thing to mention, in every bootstarp template i got some error and i fixed those but in this case i can't figure out what is the actual problem

 

please help me fixing this problem thanks in advance Amit


Amit Shah

Amit Shah
  • profile picture
  • Member

Posted 13 November 2014 - 19:00 PM

Well frankly - sorry but i cannot come across as what could be the issue here.. unless i see somewhere live.. its quite difficult to reach a solution to the same.


markfilan

markfilan
  • profile picture
  • Member

Posted 01 April 2020 - 07:03 AM

This is a common JavaScript error that happens when you try to call a function before it is defined. You get "'undefined' is not a function"  error when you try to execute a function that is uninitialized or improperly initialized . It means that the expression did not return a function object. So you have to figure out what you are trying to execute isn't a function.
 
 In Javascript , when you execute a function, it's evaluated like the following:
 
  • expression.that('returns').aFunctionObject(); // js
  • execute -> expression.that('returns').aFunctionObject // what the JS engine does
 
That expression may be complex. So when you get undefined is not a function it means that expression did not return a function object. So you have to figure out what you are trying to execute isn't a function.