Skip to content

.live() on ajax:callbacks does not work for iframes #171

@lphm

Description

@lphm

Hello,

I have an IFRAME into a page HTML. The iFRAME loads a page containing a FORM with :remote => true.

Form is successfully post by AJAX when I click on SUBMIT button but my .live('ajax:complete') callback does not work : the message "AJAX callback complete" is not display but no errors are reported.

<html>
<iframe src="/mypath"></iframe>

<script type="text/javascript">
  $(function() {
    $('iframe').load(function() {

      var dialog_form = $(this).contents().find('form.edit_block');
      dialog_form.live('ajax:complete', function(xhr, status) {
        alert('AJAX callback complete');
      });
    });
  })
</script>

</code>
</html>

Thanks for your help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions