hi all, i am trying to have the content of a txt file loaded in a page (which works), but this file changes on a regular basis and I need just the text to refreash, not the whole page, this is what I have... As mentioned, it correctly displayes the content of the .txt file, but from the code I have, I need it to refresh, any help would be greatly appreciated. Thank you in advance.
P.S. Only seems to work in IE at the moment, any advice on how to get it to work in FF would be greatly appreciated (in FF it just doesnt display the ocntent of the .txt file) Thanks
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<style type="text/css">
<!--
.style1 {
font-size: 1px;
color: #e0e0e0;
}
.style2 {
font-size: 10px;
color: #e0e0e0;
}
.style3 {
font-size: 9px;
color: #000000;
}
-->
</style>
<script language="javascript">
function GetSong(){
var url = "CurrentSong.txt";
var xmlhttp=new ActiveXObject("microsoft.xmlhttp");
try {
xmlhttp.open("GET", url, false);
xmlhttp.send();
var data=xmlhttp.responsetext;
current.innerHTML=data;
} catch (e2) {
}
}
</script>
<script language="javascript">
function reloadIt()
{
GetSong();
setTimeout("reloadIt()",10000);
}
</script>
</head>
<body>
<table width="598" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="468"><div id="title">Now Playing:</div><div id="current"></div><script language="JavaScript">reloadIt();</script>
<br /></td>
<td width="120" rowspan="2">
<script type="text/javascript">
insert_img();
</script>
</td>
</tr>
</table>
</body>
</html>