Hi all,
how can I access a field in a defined header, from the lower part of the form with JavaScript?
I created the following test-app:
Form:
Begin header
Header: [FieldHeader]
End header
Begin body
Body: [FieldBody]
End body
Defined fields in the form:
FieldBody:
onFocus:
document.forms[0].FieldHeader.value = “Fieldbody onFocus”;
onBlur:
document.forms[0].FieldHeader.value = “Fieldbody onBlur”;
Until I define a header on the form via “form-properties” - “Add header to form” everything works perfect.
If I mark and set the header area with selecting the above option “______”, I get a line in the form and the header does not scroll off the screen, when I when scroll down the form or document.
Unfortunately I get an error when setting the focus on the “Fieldbody”:
“Error in line: ToObjectError: document.forms[0].FieldHeader has no properties”
That means that the reference to the upper field has changed with setting the header.
So, what is the correct path to access the field in the header now?
Thanks a lot,
Thorolf