dd error with js Date object

  • From: Alex Hall <mehgcap@xxxxxxx>
  • To: programmingblind@xxxxxxxxxxxxx
  • Date: Thu, 14 May 2009 10:03:21 -0400

Hi all,
I am tryingto get the time since a page was opened. The following function (which may have odd punctuation since my email client will strip it) should just alert the milliseconds since the page opened, but it always says 0. What obvious error am I not seeing?

 t1=new Date().getTime();
t2=new Date();
function et(){
try{
t3=t2.getTime();
alert(t3-t1);

catch(e){
alert(e.description);



Have a great day,
Alex
__________
View the list's information and change your settings at //www.freelists.org/list/programmingblind

Other related posts:

  • » dd error with js Date object - Alex Hall