I'm trying to run a javascript function when the submit-button on a form is pressed, however instead of running the actual function, the form get posted and the javascript is never executed. I've made sure that the javascript is working by alerting stuff, however this particular function is broken. instead i am redirected to page saying notFoundHttpException. and for a short second, just before redirection, a message is written in the console saying: uncaught typeerror: object is not a function
{{ Form::open(array(null, null, 'onsubmit' => 'comment(this); return false;')); }}
{{ Form::hidden('codesnippet_id', $codesnippet[0]->id) }}
{{ Form::textarea('comment', null, array('placeholder'=>'comment')) }}
{{ Form::submit('comment', null, array('class'=>'comment-knapp'))}}
{{ Form::close() }}