Javascript
3 posters
Page 1 of 1
Javascript
Hello...how i can add javascript on modules? or is there anyway how to add javascript?
I want to add this:
<style>
#time {
background-image:url(/sites/www.gamersfirst.com.warrock/themes/warrock/images/time-background.jpg);
width:207px;
height:42px;
display:block;
position:relative;
left:503px;
top:-47px;
>top:-45px;
}
#servertime {
position:relative;
left:35px;
top:10px;
font-weight:bold;
font-size:13px;
}
</style>
<script type="text/javascript">
// Current Server Time script (SSI or PHP)- By JavaScriptKit.com (http://www.javascriptkit.com)
// For this and over 400+ free scripts, visit JavaScript Kit- http://www.javascriptkit.com/
// This notice must stay intact for use.
//Depending on whether your page supports SSI (.shtml) or PHP (.php), UNCOMMENT the line below your page supports and COMMENT the one it does not:
//Default is that SSI method is uncommented, and PHP is commented:
//var currenttime = '<!--#config timefmt="%B %d, %Y %H:%M:%S"--><!--#echo var="DATE_LOCAL" -->' //SSI method of getting server date
var currenttime = 'June 17, 2009 10:03:41' //PHP method of getting server date
///////////Stop editting here/////////////////////////////////
var montharray=new Array("Jan.","Feb.","Mar.","Apr.","May.","Jun.","Jul.","Aug.","Sept.","Oct.","Nov.","Dec.")
var serverdate=new Date(currenttime)
function padlength(what){
var output=(what.toString().length==1)? "0"+what : what
return output
}
function displaytime(){
serverdate.setSeconds(serverdate.getSeconds()+1)
/*var datestring=montharray[serverdate.getMonth()]+" "+padlength(serverdate.getDate())+", "+serverdate.getFullYear()*/
var datestring="War Rock Time "
/*var timestring=padlength(serverdate.getHours())+":"+padlength(serverdate.getMinutes())+":"+padlength(serverdate.getSeconds())*/
var timestring=padlength(serverdate.getHours())+":"+padlength(serverdate.getMinutes())
document.getElementById("servertime").innerHTML=datestring+" "+timestring
}
window.onload=function(){
setInterval("displaytime()", 1000)
}
</script>
I want to add this:
<style>
#time {
background-image:url(/sites/www.gamersfirst.com.warrock/themes/warrock/images/time-background.jpg);
width:207px;
height:42px;
display:block;
position:relative;
left:503px;
top:-47px;
>top:-45px;
}
#servertime {
position:relative;
left:35px;
top:10px;
font-weight:bold;
font-size:13px;
}
</style>
<script type="text/javascript">
// Current Server Time script (SSI or PHP)- By JavaScriptKit.com (http://www.javascriptkit.com)
// For this and over 400+ free scripts, visit JavaScript Kit- http://www.javascriptkit.com/
// This notice must stay intact for use.
//Depending on whether your page supports SSI (.shtml) or PHP (.php), UNCOMMENT the line below your page supports and COMMENT the one it does not:
//Default is that SSI method is uncommented, and PHP is commented:
//var currenttime = '<!--#config timefmt="%B %d, %Y %H:%M:%S"--><!--#echo var="DATE_LOCAL" -->' //SSI method of getting server date
var currenttime = 'June 17, 2009 10:03:41' //PHP method of getting server date
///////////Stop editting here/////////////////////////////////
var montharray=new Array("Jan.","Feb.","Mar.","Apr.","May.","Jun.","Jul.","Aug.","Sept.","Oct.","Nov.","Dec.")
var serverdate=new Date(currenttime)
function padlength(what){
var output=(what.toString().length==1)? "0"+what : what
return output
}
function displaytime(){
serverdate.setSeconds(serverdate.getSeconds()+1)
/*var datestring=montharray[serverdate.getMonth()]+" "+padlength(serverdate.getDate())+", "+serverdate.getFullYear()*/
var datestring="War Rock Time "
/*var timestring=padlength(serverdate.getHours())+":"+padlength(serverdate.getMinutes())+":"+padlength(serverdate.getSeconds())*/
var timestring=padlength(serverdate.getHours())+":"+padlength(serverdate.getMinutes())
document.getElementById("servertime").innerHTML=datestring+" "+timestring
}
window.onload=function(){
setInterval("displaytime()", 1000)
}
</script>
zerohack- Forumember
- Posts : 84
Reputation : 0
Language : Finnish & english
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum