0

I'm working with iframes in javascript\jquery and i have one problem, i've tried several technics to get one element, but all had failed. Can you help me please?

This code is in the JSP that renders the iframe content, like this:

<script>
    $(function () {
        //code goes here
    }
    (...)
</script>       

One image - thousand words http://1drv.ms/1EI0Svs

http://1drv.ms/1EI0Svs

NOTE: The element i'm trying to catch is inside one in the body root And i can get the parent div, where those elements are

Thank's

REV ATENTION: I NEVER SAID I WAS IN DIFFERENT DOMAIN, i said i was exactly at same jsp. As noob i was expecting help and i feel you kick me of. Thanks.

Pedro Guedes
  • 109
  • 1
  • 10

1 Answers1

0

As long as the iframe is the same domain and the iframe is fully loaded it is as simple as

var text = $("#IframeId").contents().find(".YourSelector").text();
epascarello
  • 204,599
  • 20
  • 195
  • 236