That seemed weird to me as well, but I have an example here (that I got somewhere else) that I was working from. Here is the code of the example if you would like to try to paste it into a file and see what happens.
<div id="testDiv"> <table border="0"> <tr> <td align="center"><font face="Arial"><strong>You have visited my page for:</strong></font></td> <td align="center"><form name="d"> <p><input type="text" size="8" name="d2"></p> </form> </td> <td align="center"><font face="Arial" color="800080"><strong>seconds!</strong></font></td> </tr> </table> </div> <script> <!-- var seconds=00 var minutes=00 var hours=00 document.d.d2.value='0' function display(){ if (seconds>=60){ seconds=0 minutes+=1 } else if (minutes>59){ seconds=0 minutes=0 hours+=1 } else seconds+=1 document.d.d2.value=hours+":"+minutes+":"+seconds setTimeout("display()",1000) } display() //--> </script> So in RT I am merely changing the document.d.d2.value= to document.TicketUpdate.UpdateTimeWorked.value= And if we look at the page, we see. <form action="Update.html" name="TicketUpdate" method="post" enctype="multipart/form-data"> . <&|/l&>Worked</&>: <input size="8" name="UpdateTimeWorked" /> <!--value=""--> The <!-value=""--> is what I changed. That was originally inside the input tag Greg Evans Hood Canal Communications (360) 898-2481 ext.212 _____ From: Aaron Sallade [mailto:[EMAIL PROTECTED] Sent: Monday, April 21, 2008 3:24 PM To: Greg Evans; RT Users Subject: RE: [rt-users] Timer for TimeWorked Also, The function "display" is self referencing, but I see nothing that calls it the first time. Maybe an onload event is needed? Aaron Sallade' Application Manager PTSO of Washington "Shared Technology for Community Health" (206) 613-8938 Desk (206) 521-8833 Main (206) 613-5078 Fax <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED] _____ From: Greg Evans [mailto:[EMAIL PROTECTED] Sent: Monday, April 21, 2008 2:36 PM To: 'RT Users' Subject: [rt-users] Timer for TimeWorked Hello all, I am attempting to implement a timer for the "TimeWorked" field so that technicians do not have to manually enter the time worked on each ticket (from creation to close). I have created two timers, one in perl and one in javascript (ok, I borrowed the one in javascript). They both work just fine when tested. The Javascript one works on a webpage, and the perl one works from the CLI. I cannot, for the life of me, make either one work with RT. The code is below. It probably could be done better, but hey I didn't write the code, just borrowed it: <script type = "text/javascript"> <!-- var seconds=0 var minutes=0 var hours=0 function display(){ if (seconds>=60){ seconds=0 minutes+=1 else if (minutes>59){ seconds=0 minutes=0 hours+=1 } else seconds+=1 document.TicketUpdate.UpdateTimeWorked.value=hours+":"+minutes+":"+seconds setTimeout("display()",1000) display() } //--> </script> The HTML part: <form action="Update.html" name="TicketUpdate" method="post" enctype="multipart/form-data"> ... <&|/l&>Worked</&>: <input size="8" name="UpdateTimeWorked" /> <!--value=""--> I put all of this into /opt/rt3/local/html/Ticket/Update.html and was hoping to do something Similar in Create.html Any ideas and any help appreciated Regards, Greg Evans Hood Canal Communications (360) 898-2481 ext.212
_______________________________________________ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: [EMAIL PROTECTED] Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com