I tried to explain how I would like to achieve this with some example code, but I was unable to make it understandable, therefore I have an image that describes the problem.
I do not necessary need any code how to achieve this, I would like suggestions on methods how to solve this, if it is even possible to do it this way. Otherwise maybe there is another way to do the same thing. I hAve googled for days now without finding any example code on this. I will just find examples how to refresh div1 and div2 from the main page.
Below is the image that explains the problem. When main page is loaded, two divs loads two other files into themselves. Is it possible to refresh one of the divs from the other page that has been loaded in the other div?
Thanks!
The image:
https://i.stack.imgur.com/Cav7P.jpg
UPDATE:
I’m trying to call this function that is placed in main.php from div1.php
function updateGroupMembers(id,groupId,action) {
// forming the queryString var data = 'id='+ id + '&groupId='+ groupId + '&action='+ action;
// if searchString is not empty if(id) {
// ajax call $.ajax({
type: "POST",
url: "div2.php",
data: data,
success: function (html) {
$('#div2').html(html);
$('#div2').fadeIn(2000);
},
});
}
return false;
}
yes it is possible… just use the same method you have used on loading the page.. and it depends on what event you’ll gonna use..
just a sample code