Skip to main content

Bug Tracker

Side navigation

#13728 closed bug (notabug)

Opened April 04, 2013 04:53AM UTC

Closed April 04, 2013 09:33PM UTC

Last modified April 04, 2013 09:36PM UTC

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

Reported by: bitlather@gmail.com Owned by: bitlather@gmail.com
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
Attachments (0)
Change History (5)

Changed April 04, 2013 07:06AM UTC by jeanno comment:1

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?

Changed April 04, 2013 07:46PM UTC by dmethvin comment:2

owner: → bitlather@gmail.com
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.

Changed April 04, 2013 08:58PM UTC by bitlather@gmail.com comment:3

status: pendingnew

Updated jsfiddle:

http://jsfiddle.net/bT33Z/5/

Changed April 04, 2013 09:33PM UTC by dmethvin comment:4

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/

Changed April 04, 2013 09:36PM UTC by bitlather@gmail.com comment:5

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