Reputation: 1126
I have 3 frames in a html page. In one frame, i am sending ajax request. Now I want to update the data sent by server in other frame. Is it possible
Upvotes: 3
Views: 1885
Reputation: 7632
Of course this is possible. From the iframe you can access the parent windows using the 'parent' object. so from the 'frame1' you can write parent.getElementById('frame2').contentDocument.getElementById('id of the control in frame2')
Upvotes: 2
Reputation: 1038920
If those frames are on the same domain here's an example how to call function from one frame to another. So once the AJAX request completes in the first frame you could call a javascript function on the second frame which will take care of updating the contents. If the frames are not on the same domain this is not permitted for security reasons.
Upvotes: 4