• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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 ]
 
And will you succeed? Yes you will indeed! (98 and 3/4 % guaranteed) - Seuss. tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic