Title page auto refresh..?

i have a problem about auto refresh title page in my web, not the page, but only the title page.
can u help me guys about the script…?

The title element can be edited, and will update where-ever it’s used.

var title = document.getElementById('title')[0];
title.innerHTML = 'A new title';

i want it automatically refresh, can it do it?

Could you please explain what you mean by automatically refresh as without code you have attempted to use its very difficult to offer any other solutions then what Paul has offered.

it doesn’t work…
<script type=“text/javascript”>

&lt;!--&lt;tpl:tmpl name="auto_ref"&gt;
setInterval(function() {
  url: '{BASE_URL}/main.php',
  //data: {name: 'username', password: 'userpass'},
  success: function() { document.title = '$var';},
  dataType: 'text'
}, 1000);


What does $var referrer to in your code?

success: function() { document.title = '[B][COLOR=#ff0000]$var[/COLOR][/B]';},

$var is variable that i take from database value, just assume “select * from…”…
please help…