Php, javascript and Css
Posted: Tue Mar 01, 2011 3:49 pm
Hi all,
Your thoughts on the scenario I have at the moment would be greatly appreciated.
Currently I have a php file which depending on some condition sets a variable in the response header to true or false.
I then have an xsl template that contains some javascript which checks whether the variable is set to true or false (jquery.post). Depending on the result, if its on I use some jquery to add a particular class to a particular div tag and if its off I remove a particular css class from a div tag. I also apply some javascript depending on the condition.
This is done for every page load. Can I somehow do this all in php which runs on the server side every 5 minutes instead of taxing the client every page refresh?
If yes, how can this be done?
Thanks as always
Your thoughts on the scenario I have at the moment would be greatly appreciated.
Currently I have a php file which depending on some condition sets a variable in the response header to true or false.
I then have an xsl template that contains some javascript which checks whether the variable is set to true or false (jquery.post). Depending on the result, if its on I use some jquery to add a particular class to a particular div tag and if its off I remove a particular css class from a div tag. I also apply some javascript depending on the condition.
This is done for every page load. Can I somehow do this all in php which runs on the server side every 5 minutes instead of taxing the client every page refresh?
If yes, how can this be done?
Thanks as always