Bug Tracker

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#13728 closed bug (notabug)

Parent page cannot bind ajaxComplete event to an iframe's document

Reported by: bitlather@… Owned by: bitlather@…
Priority: undecided Milestone: None
Component: unfiled Version: 1.9.1
Keywords: Cc:
Blocked by: Blocking:

Description

=[ Description ]=

  • The "parent" page has an iframe.
  • The "parent" page binds an ajaxComplete event on the iframe's document.
  • The iframe performs some ajax.

Expectation: ajaxComplete is called. Reality: ajaxComplete is not called and no error appears in chrome's inspect element.

http://jsfiddle.net/bT33Z/1/

=[ Browser & OS ]=

  • jQuery v1.9.1
  • chrome v24.0.1312.70
  • linux mint 11

Change History (5)

comment:1 Changed 6 years ago by jeanno

Is that possible for you to build the example somewhere else to show the problem? As you have stated that you "Cannot emulate the issue on JSFIDDLE because it involves an iframe and jquery".

Also, is this behaviour intentionally designed?

comment:2 Changed 6 years ago by dmethvin

Owner: set to bitlather@…
Status: newpending

I would think it's possible to model this in jsFiddle, or at jsbin.com. you just need both pages to be on the same domain. Either site can do ajax. We can't triage the bug report without some more information and a test case.

comment:3 in reply to:  2 Changed 6 years ago by bitlather@…

Status: pendingnew

comment:4 Changed 6 years ago by dmethvin

Resolution: notabug
Status: newclosed

Okay I see what you're doing now, although it would have to be like this: http://jsfiddle.net/bT33Z/6/

The problem is that you are attaching an ajaxComplete event handler to the parent's jQuery event system but triggering that event in the child's event system where the handler does not exist. You need to attach the handler in the child.

http://jsfiddle.net/bT33Z/7/

comment:5 Changed 6 years ago by bitlather@…

Sorry to waste your time. Your response speed is incredible! Have a great day.

Note: See TracTickets for help on using tickets.