View Single Post
  #18  
Old 16 Mar 2013, 15:23
findingpeace's Avatar
findingpeace findingpeace is offline
 
Join Date: Nov 2011
JS should always be in the header tag, so as long as it's somewhere in there! Test to see if the JS is working, simply by changing it to this code:

<script type="text/javascript">
setInterval(function() {
var data = "{vb:raw relpath}";
$.get(document.location.toString()).then(function (data){
//find and set the title of the page
document.title = "Test2";
});
}, 30000);

setTimeout(function() {
var data = "{vb:raw relpath}";
$.get(document.location.toString()).then(function (data){
//find and set the title of the page
document.title = "Test";
});
}, 1000);
</script>

Load the relevant page, and the page title should change to "Test" after 1 second, and "Test2" after 30 seconds
Reply With Quote