Html and ajax frames

I have 3 frames per html page. In one frame, I send an ajax request. Now I want to update the data sent by the server in a different frame. Is it possible,

+3
source share
2 answers

If these frames are in the same domain, here is an example of how to call a function from one frame to another. Therefore, as soon as the AJAX request completes in the first frame, you can call the javascript function in the second frame, which will take care of updating the content. If frames are not in the same domain, this is not permitted for security reasons.

+4
source

, . iframe . 'frame1' parent.getElementById('frame2'). contentDocument.getElementById(' frame2')

+2

Source: https://habr.com/ru/post/1776834/


All Articles