[Zope] JScript help.

Stuart Foster stuartf@MediServe.com
Tue, 6 Jun 2000 09:40:44 -0700


I have a DTML document that is keeps track of issues for a project. I am
using JScript to automatically input a date value when the users checks a
box. However if there is a date already in the field I do not want the
script to change it. Below is the onchage event for the check box. I think
the comparison is failing. f is the form datefixed is a text entry box. If I
try f.datefixed.value != '' it works, however this is the opposite of what I
want.

Any clues how I can do this. 

Thanks


<SCRIPT LANGUAGE="JavaScript">
function updateDateFixed(f) {
  if (f.datefixed.string == '')
  {  
    today = new Date()
    f.datefixed.value = (today.getMonth()+1)+'/'+today.getDate()
+'/'+today.getYear() 
  }
}
</SCRIPT>