| Subject |
calculated entryfield value |
| From |
Gaetano De Luisi <gaetanodd@hotmail.com> |
| Date |
Thu, 16 Jul 2020 22:04:53 -0400 |
| Newsgroups |
dbase.getting-started |
I have qa form that has some default entryfield values that can be updated by the user. THe initial value of one entryfield uses the values of those other entryfields. To set the value of this calculated field, I use the form's onOpen event as follows:
function form_onOpen()
this.entrytime1.value=this.entrystarttime.value+"-";
+str((val(this.entrystarttime.value)+val(this.entryruntime.value)))
return
The value of entrystarttime is 9, the value of runtime is 2, so I am trying to display "9-11".
The value of entrytime1 gets set as expected, however I have a formatting issue. Instead of getting "9-11" I get "9- 11" (with 8 spaces).
What do I need to do to get rid of the spaces? I tried to use trim() but it didn't change anything.
Thanks!
|
|