views:

39

answers:

0

I'm seeing a strange problem in my jQuery in a Ruby on Rails application:

I'm loading content using ajax.load() into an absolute positioned div (modal). The loaded HTML contains a <form>-element with both action and methodparameters as well as a submit-button (input type=submit). I have another form present in the 'main' document (with another ID etc.)

However, when I click the submit-button to submit the form, nothing happens. I've tried subscribing to various events via. jQuery to debug:

  1. Subscribing (via live()) to form:mouseover yields a result when hovering the form - both in the modal and on the page itself.
  2. Subscribing to input[type=submit]:mouseover yields a result when hovering the submit-button - both in the modal and page itself.
  3. HOWEVER - subscribing to either input[type=submit]:click or form:submit ONLY works on the page itself and not in the loaded form.

The problem is clearly that I'm displaying a form, that the user is unable to submit. How can this be?

Thanks!