brite, a MVC Framework for jQuery

jQuery: iFrame find elements

July 20th, 2009 by jeremychone


4 Responses to “jQuery: iFrame find elements”

  1. Praveen Says:

    Nice post on how to access content in IFrame in Jquery here.

  2. videolar Says:

    how can i access the value inside iframe help me please

  3. jeremychone Says:

    @videolar If the iFrame is from the same server, then the above solution should work. Otherwise, you are kind of doomed.

  4. charly Says:

    the ONLY dependency whether you can access the content of an iframe or not, is the same origin policy.

    Whenever the content of the parent and (i)frame is loaded from a host with the same hostname then you are OK, if you have the ability to set the document.domain property in the documents loaded.

    Caveat: they have to be set in BOTH documents, i.e. NOT only the iframe content.

    Then you can easily access content on from and vice versa.

    (in this example you’d have to set:

    document.domain = “”;

    in BOTH, the accessing and the accessed document)