Jump to content

Refresh function/change META tag/stop one of those..


adamfr

Recommended Posts

OK.. I have a page that refreshes every 5 second, I have a td that if u dbl click it u open a menu and when u do I want the page not to refresh for 12 seconds so whoever opens that menu will have time to do what he needs..my first idea was a META tag that refreshes the page but I can't change it in any way :) I really wanna know if its possible to change it.. nd GetElementById or ByTagName are no gooa cause it dosen't works with META as I've seen so I tried to make a funciton with setTimeout and still no good..does anyone has any idea how to do it without making to page to reload b4 the value changes? or maybe how to change the content of a mETA tag????? :)

Link to comment
Share on other sites

you can access the meta tags with JS like this

var meta = document.getElementsByTagName('meta');

Or you could just control the refreshing with a JS timer in the first place. That would make it easy to change the refresh times.

Link to comment
Share on other sites

Here's a javascript sample:

<script type="text/javascript">  function refresh() {	window.location.reload();  }  /*	In this, you'll have to have a function named "menuUp()" that	returns "true" or "false"	depending on whether your menu is up or not.  */  if(menuUp) { //checks if the function returned true	x=setTimeout(refresh,12000);  }  else {	x=setTimeout(refresh,5000);  }</script>

Hope that helps.Choco

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...