On Fri, Jan 6, 2012 at 8:43 AM, Daniel Negri <[email protected]>wrote:

> I'm using the very old trick:
>
> // Prevent double click
>
> $('form').submit(function(){
>
>   $('input[type=submit]', this).attr('disabled', 'disabled');
>
> });
>
>
That would work if I had a submit button =)

The scenario is a ... Exam Question, wich has 4 alternatives. After click
on an alternative it automatically saves/updates(only happens if its
already checked)

And now when I want to do this

function submit_with_ajax(t){
   $("#myForm").submit(function(){
          alert("hi");
   });
}

nothing happens. I'm trying to change that alert with an $.ajax() method in
order to do something after complete

Thanks

Javier

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to