Why is my function undefined?
It writes, that SOMEHOW the function
sendComment is not defined... Could somebody define it?
Move the function out of
onclick can only using functions in the global scope. Variables (and therefore functions) defined inside functions are put in the scope of the function, so you can avoid name collisions.