Results 1 to 4 of 4
Hi all
i have a fedora 15 LXDE
I have a web based ticketing system that i need to have it refresh every X minutes.
however the refresh button reloads ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 06-29-2011 #1Just Joined!
- Join Date
- Jun 2011
- Posts
- 2
Auto refresh
Hi all
i have a fedora 15 LXDE
I have a web based ticketing system that i need to have it refresh every X minutes.
however the refresh button reloads the page but does not grap new contents. there is a button to refresh each pain of the page that grabs the new info.
Apperantly i need some kind of script in order to have that button(link) refresh every so often.
Im stuck as im not a scriptor nor linux guru
Can you help me out here?
Thanks
- 06-29-2011 #2Trusted Penguin
- Join Date
- May 2011
- Posts
- 3,680
Sounds like you need a bit of javascript. What I would do is:
1. throw together a javascript function that invokes that button
2. have that function called whenever the page loads (via the javascript body onload event)
3. use meta refresh element to have the page auto-refresh every 5 seconds (or whatever number you want) - note: using meta refresh is legacy, but hey it works for me
E.g.:
Code:<html> <head> <meta http-equiv="REFRESH" content="5"> <script type='text/javascript'> function invoke_reload_button() { // do stuff to invoke that button } </script> </head> <body onload="invoke_reload_button()"> html code blah blah cool button, etc. </body> </html>
- 07-04-2011 #3Just Joined!
- Join Date
- Jun 2011
- Posts
- 2
2. have that function called whenever the page loads (via the javascript body onload event)
How would i do that ?
- 07-04-2011 #4Trusted Penguin
- Join Date
- May 2011
- Posts
- 3,680
This portion of the code I posted does that:
The onload portion is a Javascript event. See here for more info.Code:<body onload="invoke_reload_button()">
It says that every time the page is loaded (either via the browser refresh button, or any HTML that causes the page to reload) call the invoke_reload_button javascription function - which of course must be defined by you.


Reply With Quote

