Bug Tracker

Opened 12 years ago

Closed 12 years ago

#9848 closed bug (invalid)

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

Reported by: [email protected] Owned by: [email protected]
Priority: undecided Milestone: 1.next
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?

Change History (3)

comment:1 Changed 12 years ago by ajpiano

Owner: set to [email protected]
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: http://jsfiddle.net/rwaldron/da3nM/ 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

comment:2 Changed 12 years ago by ajpiano

#9847 is a duplicate of this ticket.

comment:3 Changed 12 years ago by Rick Waldron

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.

Note: See TracTickets for help on using tickets.