Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
icon4.gif   Checks on datetime seconds field generate warning in IE7, posted by Richard Stamper on Wed Jul 1 17:00:30 2009 Javascript_warning.jpg
    icon2.gif   Re: Checks on datetime seconds field generate warning in IE7, posted by Stefan Ritt on Thu Jul 2 08:36:57 2009 
Message ID: 66429     Entry time: Thu Jul 2 08:36:57 2009     In reply to: 66428
Icon: Reply  Author: Stefan Ritt  Author Email: stefan.ritt@psi.ch 
Category: Bug report  OS: Windows  ELOG Version: 2.7.6-2227 
Subject: Re: Checks on datetime seconds field generate warning in IE7 

Richard Stamper wrote:

When adding a log entry containing a datetime field using the IE7 browser a Javascript warning is displayed - see the attachment.  This is due to a change in the naming of the "seconds" field of a datetime entry (made in version 2143) not being propagated to the code that generates the Javascript that checks the supplied values.

Suggested patch follows.

Change "s%d" to "c%d" in lines 9675 and 9678.

Showing lines 9675-9680 below, change from:

               rsprintf("  if (document.form1.s%d.value == \"\") {\n", i);
               sprintf(str, loc("Please enter second for attribute '%s'"), attr_list[i]);
               rsprintf("    alert(\"%s\");\n", str);
               rsprintf("    document.form1.s%d.focus();\n", i);
               rsprintf("    return false;\n");
               rsprintf("  }\n");

to:

               rsprintf("  if (document.form1.c%d.value == \"\") {\n", i);
               sprintf(str, loc("Please enter second for attribute '%s'"), attr_list[i]);
               rsprintf("    alert(\"%s\");\n", str);
               rsprintf("    document.form1.c%d.focus();\n", i);
               rsprintf("    return false;\n");
               rsprintf("  }\n");

Regards,

Richard Stamper

This is absolutely correct, even the right fix. I put that into the distribution. Thanks a lot. 

ELOG V3.1.5-fe60aaf