• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Meta Refresh

 
Ranch Hand
Posts: 1907
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have PHP page which is refreshed every 5 minutes.Refresh is done using HTML Meta tag.PHP page contains expand and collapsable data.That is user clicks on + ,html table with dynamic data is shown.When he clicks on -, table is collapsed.Problem is after refresh, if table is already shown, due to refresh it gets collpased.How to avoid this?In short:
1)User has clicked on + on php page.
2)He is watching HTML table.
3)After some time, page gets automatically refreshed.
4)HTML table is collapsed.
5)User again has to clik on + to see the same table.

How to avoid this?so that table does not collapse but data is refreshed.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You would have to remember that the table is open with cookies and when the page loads [or in the php page] read the cookies and reopen that node.

Eric
 
Arjun Shastry
Ranch Hand
Posts: 1907
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks.I can set the cookies in PHP.But if uses minimizes and table is collpased again, I need to call invalidate cookie method(or expire it immediately) so that on page reload, table is not opened.
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So you set the cookie with JavaScript when the user performs an action.

You could also learn about Ajax and not deal with the page refreshing.

Eric
 
Arjun Shastry
Ranch Hand
Posts: 1907
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks.5 minutes interval because records are inserted into database tables every 5/10 minutes.Hence PHP page needs to show status of latest records.Is that possible using AJAX?PHP needs to be run when records are inserted.
[ May 17, 2008: Message edited by: Arjun Shastry ]
 
A timing clock, fuse wire, high explosives and a tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic