On Jul 8, 5:10 pm, tristan <tristanbrother...@gmail.com> wrote:
> I'm sure this is very simple, I'm quite very new to JavaScript. I have
> a function for submitting a form, I'd like it to stop the user from
> submitting the form multiple times by click on my submit link multiple times.
> I
> haven't found a way to do this in the docs. Can anyone point me in the
> right way?
>
> My function looks like this:
>
> function submitComments(id, numComments) {
> $('#response-'+id).fadeIn('fast');
> $('#commentForm-'+id).ajaxForm({
> target: '#response-'+id,
> success: function() {
>
> loadComments(id, numComments);
> $('#commentValue-'+id).val('Speak your brains! ')
>
> }});
>
>
>
> }