lol, ok nice

Here is the JavaScript AJAX function to get the information from the html file:
function ajaxGet()
{
if (status == true) {
if (req == null)
req = new XMLHttpRequest();
if (req) {
req.onreadystatechange = infoReceived;
req.open("GET", trackURL, true);
req.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT");
req.send(null);
}
var ajaxGain = setTimeout("ajaxGain()", updateInterval);
}
}
function ajaxGain()
{
req = null;
clearTimeout(ajaxGain);
ajaxGet();
}
function infoReceived()
{
if (req.readyState == 4) {
if (req.status == 200) {
// var output = req.responseText.match(/<body>(.*?)<\/body>/g);
var output = req.responseText;
output = output.replace(/<\/?[^>]+(>|$)/g, "");
if (song != output) {
song = output;
pos = 0;
clearTimeout(timer);
startScroll();
}
} else {
song = "Track Server Error: " + req.status + ", Response: " + req.statusText;
}
}
}
Here is the html file code (located on our server):
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>KIK FM, Darwin NT </title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Refresh" content="15">
<comment><!--SMSTKSTART-->{PL1_SONG?} - {PL1_ARTIST?}<!--SMSTKEND--></comment>
</head>
<body>
<div id="information" align="center">
<tt><b> {PL1_SONG?} - {PL1_ARTIST?}</b></tt>
</div>
</body>
</html>
<!-- NOTE: the use of {PL1_SONG?} - {PL1_ARTIST?} is necessary for us to change their values to the songs name and artist upon a new event (song changes) -->
The ajax replaces all html tags with "", therefore leaving:
KIK FM, Darwin NT {PL1_SONG?} - {PL1_ARTIST?} {PL1_SONG?} - {PL1_ARTIST?}
Remembering that the {} will not be present in the html file, as they will be overridden by the song name and artist.
This means that the pulled string will end up looking like (my favourite song as an example

):
KIK FM, Darwin NT Light the Skies (Retrobyte Electrobounce Mix) - Cerf, Mitiska, & Jaren Light the Skies (Retrobyte Electrobounce Mix) - Cerf, Mitiska, & Jaren
EDIT
OMG!!!! The forum removed the duplicate entry... hmmm... not sure why that happened, I put them in the [cod3]... hmmmm... anyone know how this board runs the posting? lol!
It should have:
Light the Skies (Retrobyte Electrobounce Mix) - Cerf, Mitiska, & Jaren
After the first one too...
/EDIT
As we all know, JavaScript and HTML will not show the multiple 'spaces'
But JavaScript (I have found) pauses between the large spaces... a nice effect (hopefully no full of memory leaks, slowdowns and bad bugs are caused by this) for the gadget, as it shows the KIK FM bit, scrolls, pauses at the first character of the song name, scrolls through the first entry (song name, song artist) and pauses again haha.
Hope thats enough information for you guys to use.

Thanks for your help, as always
