Bug Tracker

Ticket #9848 (closed bug: invalid)

Opened 3 years ago

Last modified 3 years ago

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

Reported by: 419633732@… Owned by: 419633732@…
Priority: undecided Milestone: 1.next
Component: unfiled Version: 1.6.2
Keywords: Cc:
Blocking: Blocked by:

Description

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

Change History

comment:1 Changed 3 years ago by ajpiano

  • Owner set to 419633732@…
  • Status changed from new to pending

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 3 years ago by ajpiano

#9847 is a duplicate of this ticket.

comment:3 Changed 3 years ago by rwaldron

  • Status changed from pending to closed
  • Resolution set to invalid

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.