Jump to content

Help please...


2ji8888
 Share

Recommended Posts

whenever i use the timer on my page, ctrl+z inside my textarea is no longer working.. help please...any help would be greatly appreciated..heres the code:

<html><head><title>Notes</title><STYLE type="text/css">body {background-color: 000000}input	{	  font-family:Verdana, sans-serif;	  font-size:9px;	  font-style: normal;	  line-height: normal;	  color: #333333;	   }p	  {	font-family:Verdana, sans-serif;	font-size:10px;	font-style: normal;	line-height: normal;	color: CC9933;	}input.time	 {		  font-family:Verdana, sans-serif;		}td.time		 {		  font-family:Verdana, sans-serif;		  font-weight: bold;		  font-size:15px;		  background-color: 004000;		  color: red;		}</STYLE><style type="text/css">		 .default{			width: 310px;			padding: 3px;			text-align:left;			font:bold 10pt sans-serif;			background-color:F2F2F2;			font-size:11px;			border:1px solid #000000;		 }		 .calcAvgInput{			float:right;			background-color:#FFFFFF;			border:1px solid #7F9DB9;			font:normal 10pt sans-serif;		 }	  </style><script type="text/javascript">function StopWatch (showTime) {  this.id = StopWatch.watches.length;  StopWatch.watches[this.id] = this;  this.showTime = typeof showTime == 'function' ? showTime : function() {};  this.reset();}StopWatch.prototype.reset = function () {  this.time = 0;  this.components = {};  this.computeComponents();  this.showTime(this.components);}StopWatch.prototype.start = function () {  this.tid = setTimeout('StopWatch.watches[' + this.id + '].run()',1000);}StopWatch.prototype.stop = function () {  clearTimeout(this.tid);}StopWatch.prototype.run = function () {  this.tid = setTimeout('StopWatch.watches[' + this.id + '].run()',1000);  this.time++;  this.computeComponents();  this.showTime(this.components);}StopWatch.prototype.computeComponents = function () {  var hours = Math.floor(this.time / StopWatch.secondsPerHour);  var remainingTime = this.time - hours * StopWatch.secondsPerHour;  var minutes = Math.floor(remainingTime / StopWatch.secondsPerMinute);  var seconds = remainingTime - minutes * StopWatch.secondsPerMinute;  var formattedTime = '';  formattedTime += hours + ':';  formattedTime += minutes < 10 ? '0' + minutes + ':' : minutes + ':';  formattedTime += seconds < 10 ? '0' + seconds : seconds;  this.components.time = this.time;  this.components.hours = hours;  this.components.minutes = minutes;  this.components.seconds = seconds;  this.components.formattedTime = formattedTime;}StopWatch.secondsPerMinute = 60;StopWatch.secondsPerHour = StopWatch.secondsPerMinute * 60;StopWatch.watches = new Array();</script><script type="text/javascript">var stopWatch2;function showTimeTableWatch (components) {  if (document.all)	document.all.timeCell.innerText = components.formattedTime;  else if (document.getElementById)	document.getElementById('timeCell').firstChild.nodeValue =components.formattedTime;}</script><script type="text/javascript">stopWatch = new StopWatch(showTimeFormWatch);</script><script language= VBscript>sub mnuNextCall_OnClickwith Menu  .txtCallCntr.Value = Int(.txtCallCntr.Value) + 1end withend sub</script></head><body>	   <div align="left">		<form name="notepad">		<table width="100%" border="0" cellpadding="0" cellspacing="0" style="border-collapse:collapse">			<tr>			<td>			<textarea name="commentbox" rows="14" cols="38" wrap="">issue: tel: caller: p.email: os: modem: router: nonet/s			</textarea>			</tr>			</td> 		<tr>		<td>		<input type="reset" name="reset3" value="RESET" style="font-family: Verdana font-size: 9.0pt">		</td>		</tr>		</form> 			<form name="notepad2">			<table width="100%" border="0" cellpadding="0" cellspacing="0" style="border-collapse:collapse"> 			<tr>			<td>				<textarea name="commentbox" rows="5" cols="38" wrap="">			</textarea>			</tr>				 </td>			<tr>			<td>			<input type="reset" name="reset4" value="RESET" style="font-family: Verdana font-size:9.0pt" >			</td>			</tr>			</form><tr><td><br><table width="100%" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse"><td><tr>  <div class="default" style="background-color:#D9EDDD;">	<b>Daily Average Handle Time </b>	  <div class="default">		 <input type="text" name="value" id="valueID" value="" class="calcAvgInput" size='5''highlight' /> Last Call :	  </div>	  <div class="default">		 <input type="text" name="divisor" id="divisorID" value="0" class="calcAvgInput"style="background-color:#D9EDDD;font:bold 10pt sans-serif;" size='1' maxlength='2' readonly />Number's of call :	  </div>	  <div class="default">		 <input type="text" name="total" id="totalID" value="0" class="calcAvgInput"style="background-color:#D9EDDD;font:bold 10pt sans-serif;" size='6' maxlength='2' readonly /> TotalHandle Time :	  </div>	  <div class="default">		 <input type="text" name="average" id="averageID" value="0" class="calcAvgInput"style="background-color:#D9EDDD;font:bold 10pt sans-serif;" maxlength='2' readonly /> AHT :	  </div>	<div class="default">		 <input type="button" value="Calculate Average" class="calcAvgInput" onclick="calcAverage();"/>	  </div><script type="text/javascript">		 function calcAverage(){			if(isNaN(parseFloat(objAmount.value))){			   alert("Enter only numbers and try again.");			} else {			   objDivisor.value = parseFloat(objDivisor.value) + 1;			   objTotal.value = parseFloat(objTotal.value) + parseFloat(objAmount.value);			   objAverage.value = (objTotal.value / objDivisor.value);			}		 }   		 var objTotal = document.getElementById("totalID");		 var objAmount = document.getElementById("valueID");		 var objAverage = document.getElementById("averageID");		 var objDivisor = document.getElementById("divisorID");	  </script></div></td></tr></table><br><table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse">	 <td id="timeCell" class="time" align="center"valign="middle">clock </td></tr></tr><tr><td color="white"><input type="button"	   value="start"	   onclick="stopWatch2.start();"/><input type="button"	   value="stop"	   onclick="stopWatch2.stop();"/><input type="button"	   value="reset"	   onclick="stopWatch2.reset();"/></td></tr></font></tr></td></table><script type="text/javascript">stopWatch2 = new StopWatch(showTimeTableWatch);</script> <br><table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse"><tr><td><form name="menu"><input type='button' name='mnuNextcall' value='Start Next Call' style='font-family: verdana; font-size: 10px;'><div align='left' font-family: verdana; background-color : F2F2F2; font-size: 11px; border:1px solid black;><font face="Verdana" size="1" color="RED">Calls Handled : </font><input type='text' name='txtCallCntr' value='0' size='1' maxlength='2' readonly></div></div></form></font></tr></td></table> </table></p></table></body></html>

any

Link to comment
Share on other sites

im sorry sir but somebody made that code for me so ill be honest with you that i no nothing about the code, i only know how to use it. thats why its puzzling me that whenver my clock is rnning (timer script) in the text area my undo command (ctrl+z) is not working..so if you can guys fix it, ill really appreciate it.i know im asking you to spoon feed me but please, this html ease up my work. thank you sir.btw on firefox the script is working perfectly its just that i dnt use firefox as it mess up the alignment of other script. thanks.

Link to comment
Share on other sites

I don't see anything that would obviously cause something like undo not to work. It might be an issue with what field has focus, but I don't see focus being removed either. If it works in Firefox then it might just be a bug in IE.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...