trying to make this script work:
<script type="text/javascript">
var tmp='<html><head><title>popup</title>';
tmp+='<script type=text/javascript>';
tmp+='function nowTime(){';
tmp+='var oNowTime=new Date();';
tmp+='var iMonth=oNowTime.getMonth();';
tmp+='var iDate=oNowTime.getDate();';
tmp+='var iYear=oNowTime.getFullYear();';
tmp+='var iHours=oNowTime.getHours();';
tmp+='var iMinutes=oNowTime.getMinutes();';
tmp+='var iSeconds=oNowTime.getSeconds();';
tmp+='var iMilliSeconds=oNowTime.getMilliseconds();';
tmp+='var sNowTime=iHours+":"+iMinutes+":"+iSeconds;';
tmp+='return sNowTime';
tmp+='}';
tmp+='function nowDate(){';
tmp+='var oNowTime=new Date() ';
tmp+='var iMonth=oNowTime.getMonth()+1';
tmp+='var iDate=oNowTime.getDate()';
tmp+='var iYear=oNowTime.getFullYear()';
tmp+='var iHours=oNowTime.getHours()';
tmp+='var iMinutes=oNowTime.getMinutes()';
tmp+='var iSeconds=oNowTime.getSeconds()';
tmp+='var iMilliSeconds=oNowTime.getMilliseconds()';
tmp+='var sNowTime=iYear+"-"+iMonth+"-"+iDate;';
tmp+='return sNowTime';
tmp+='}';
tmp+='function showNowTime(){';
tmp+='var oObjId1=document.getElementById("mdate");';
tmp+='oObjId1.innerHTML=nowDate();';
tmp+='var oObjId2=document.getElementById("mclock");';
tmp+='oObjId2.innerHTML=nowTime();';
tmp+='setTimeout("showNowTime()",1000)';
tmp+='}';
tmp+='<\/script></head><body onload="showNowTime()">';
tmp+='<font size="7">';
tmp+='<div id="mdate">mdate</div>';
tmp+='<div id="mclock">mclock</div>';
tmp+='</font></body></html>';
var newwindow2=window.open('','name','height=200,width=150');
newwindow2.document.write(tmp);
</script>
What's Wrong ??
any suggestions are welcomed.
thanks