Skip to main content

Bug Tracker

Side navigation

#9848 closed bug (invalid)

Opened July 17, 2011 03:19AM UTC

Closed July 18, 2011 12:02PM UTC

i bind data to a element of a iframe,i can't get it in another iframe

Reported by: Owned by:
Priority: undecided Milestone:
Component: unfiled Version: 1.6.2
Keywords: Cc:
Blocked by: Blocking:

when i use $.data() bind some data to a iframe's element,i can't get it in another iframe. why?

Attachments (0)
Change History (3)

Changed July 17, 2011 04:08AM UTC by ajpiano comment:1

owner: →
status: newpending

Thanks for taking the time to contribute to the jQuery project! Please provide a reduced jsFiddle test case to help us assess your ticket! Additionally, be sure to test against the jQuery Edge version to ensure the issue still exists. To get you started, we've created this boilerplate: Open the link and click to "Fork" in the top menu.

By the way,

1) You can't access the contents of an iframe if it's on another domain

2) The bug tracker is not a support venue, if you need help, please use the forum

Changed July 17, 2011 04:09AM UTC by ajpiano comment:2

#9847 is a duplicate of this ticket.

Changed July 18, 2011 12:02PM UTC by rwaldron comment:3

resolution: → invalid
status: pendingclosed

Every iframe has it's own context, so unless you explicitly target the iframe context and set data to elements within that context, then you can't realistically expect it to exist if it was set in another different context.