PDA

View Full Version : Javascript won't work



delgadoj522
06-15-2009, 11:22 PM
Hi, I am trying to add a javascript to my website and have the used both the script feature and the html feature of bluevoda. The javascript is generated from http://www.nationvoice.com/status.php. The code I generated is:

<script language="JavaScript" type="text/javascript">
var NVSettings = new Array(
"ServerIP: NewYork7.MLGVoice.com",
"ServerPort: 4417",
"Style: Detailed",
"EnaName: 1",
"EnaIP: 1",
"EnaComments: 1",
"EnaAuth: 0",
"EnaCodec: 1",
"EnaUptime: 0",
"EnaPlatform: 0",
"EnaClients: 1",
"Color: Blue",
"Width: 350",
"Height: 475",
"FontSize: 11",
"FontFamily: Verdana",
"Margin: 5",
"Padding: 10",
"BgColor: EBF0F3",
"BorderWidth: 4",
"BorderColor: 888888",
"BorderStyle: none"
);
var NVRdm = Math.random();
var NVUrl = "http://www.nationvoice.com/VentriloStatus/request.php?ran=" + NVRdm;
for(i=0;i<NVSettings.length;i++) {
var NVItems = NVSettings[i].split(":");
NVUrl += "&" + NVItems["0"].replace(/\s+/g,"") + "=" + NVItems["1"].replace(/\s+/g,"");
(NVItems["0"].replace(/\s+/g,"") == "ServerPort") ? NVDiv = NVItems["1"].replace(/\s+/g,""):"";
}
document.write('<div id="NVSTATUS_' + NVDiv + NVRdm + '"><\/div>');
document.write('<script language="JavaScript" type="text\/javascript" src="' + encodeURI(NVUrl) + '"><\/script>');
</script>

I tried looking but really can't see what might be the reason it's not working. Maybe you guys can help me, I would truly appreciate all the help, thanks =]

Watdaflip
06-16-2009, 12:06 AM
Can you provide a link to your webpage you tried it on?

delgadoj522
06-16-2009, 12:17 AM
Well it worked after I published it, it just wouldn't appear in the preview of the webpage. Thanks anyways.