Archive for myfreeforum.org Before posting please check the "stickies" in the support forums. Please ask questions in real English and not "txt". You will get a better response. Please do not ask support questions via PMs.
|

BenMcDermott
|
Script In Table...ok.. i want this script.... (shown in the link) (the green uptime) http://www.bens-ts-server.diagemshosting.net/lights.shtml
| Code: | <font color="green"><script>
var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")
function countup(yr,m,d){
var today=new Date()
var todayy=today.getYear()
if (todayy < 1000)
todayy+=1900
var todaym=today.getMonth()
var todayd=today.getDate()
var todaystring=montharray[todaym]+" "+todayd+", "+todayy
var paststring=montharray[m-1]+" "+d+", "+yr
var difference=(Math.round((Date.parse(todaystring)-Date.parse(paststring))/(24*60*60*1000))*1)
difference+=" Days"
document.write("Server Uptime: "+difference+"")
}
countup(2005,11,01)
</script></font> |
...in this table (shown in the link) (where it says server uptime) http://www.bens-ts-server.diagemshosting.net/server.shtml
| Code: | <center><table width="300" border="5">
<tr><td align="left">Name:</td>
<td align="left"><b>Ben's TS Server</td>
<tr><td align="left">IP:</td>
<td align="left"><b>209.67.209.50:8767</td></tr>
<tr><td align="left">OS:</td>
<td align="left"><b>Linux</td>
<tr><td align="left">Version:</td>
<td align="left"><b>2.0.20.1</td>
<tr><td align="left">Server Uptime:</td>
<td align="left">UPTIME SCRIPT HERE :s</td>
</tr></table></center> |
but when i try the whole table messes up.. how would i get the uptime into the table without messing it all up?
|
Viper
|
Try this:
| Code: |
<center><table width="300" border="5">
<tr><td align="left">Name:</td>
<td align="left"><b>Ben's TS Server</b></td>
<tr><td align="left">IP:</td>
<td align="left"><b>209.67.209.50:8767</b></td></tr>
<tr><td align="left">OS:</td>
<td align="left"><b>Linux</b></td>
<tr><td align="left">Version:</td>
<td align="left"><b>2.0.20.1</b></td>
<tr><td align="left">Server Uptime:</td>
<td align="left"><font color="green"><script>
var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")
function countup(yr,m,d){
var today=new Date()
var todayy=today.getYear()
if (todayy < 1000)
todayy+=1900
var todaym=today.getMonth()
var todayd=today.getDate()
var todaystring=montharray[todaym]+" "+todayd+", "+todayy
var paststring=montharray[m-1]+" "+d+", "+yr
var difference=(Math.round((Date.parse(todaystring)-Date.parse(paststring))/(24*60*60*1000))*1)
difference+=" Days"
document.write("Server Uptime: "+difference+"")
}
countup(2005,11,01)
</script></font></td>
</tr></table></center> |
You missed the tags out so the whole script was in bold
|
BenMcDermott
|
thanks, will give it a try
|
Viper
|
I just tested it on my website and it works
|
St0rm[TitE]
|
what does it actually do?
|
BenMcDermott
|
well thanks viper.. you saved my day
if there's anything i can do for you, let me know :P
|
|
|
|