0

I have a document with the following structure:

<div id="Prueba">
      <iframe id="myiframe1">
            <div id="div_Actual"></div>
      </iframe>
</div>

I want to know if from the html page that is in the iframe, I can access the div element with id = 'Test' this to change the size of the element I want or manipulate it with css, I have tried with jquery in the following way but it does not give me:

$(this).parent().parent().attr('id');
PolloKulos
  • 133
  • 5
  • It is not possible, page inside is not connected to the DOM on outside. – epascarello Nov 06 '18 at 22:38
  • what would `$(this)` be ? – Mojo Allmighty Nov 06 '18 at 22:38
  • In most cases where someone asks this question, they really want to know how to load a page into another page without reloading the whole page, in which case you probably want to an AJAX call instead of an iframe, because this will load the other page as content rather than as an isolated container... just be mindful to only do this with stuff that you own and trust. – Nosajimiki Nov 06 '18 at 23:07

0 Answers0