Search code examples
phphtmlajaxframeframeset

Updating frameset frame contents using Ajax and PHP


I have two frames - left frame contains menu options created using css and right frame displays the php page which is executed depending upon menu option clicked in left frame.

I have a php page where data comes from underlying mysql database.

No. Name Flag

1 Sandeep Processed

2 Shoubhik Pending

3 Rahul Processed

4 Rehan Processed

The data in 'Flag' column is a clickable link which is toggle type. If it displays 'Pending' then clicking on it will change to "Processed' and vice-versa.This is achieved using ajax.

What i want is the count of Names 'Processed' and 'Pending' in left frame menu option. This should be updated on real time as and when the 'Flag' in the above php page is updated by the user in the right frame by clicking on the link.

e.g.

Left frame menu should display this .

Processed (3) Pending (1)


Solution

  • figured out on my own....'

    just called this code : parent.frames['leftFrame'].location.reload();

    on onreadystatechange event

    thanks to all