P
Pavils Jurjans
Hello,
I have bumped upon this problem: I do some client-side form processing
with JavaScript, and for this I loop over all the forms in the
document. In order to identify them, I read their "name" property
(which sources from "name" HTML attribue). The problem is, that if the
form contains form control named "name", it overwrites the form name
property. In fact, I'm quite surprised that it's so easy to spoil any
of the form object properties - the form just needs to contain a field
named, say, "onsubmit", and - voila - it's done! Also, if the form
contains field "name", then attempting to assign another name to the
form object will result in error. Quite lame, if you ask me... The
field names shouldn't really matter.
Is there any other alternative way to read and write the form object
properties, if their name conflicts with the form field names?
Thank you,
Pavils
I have bumped upon this problem: I do some client-side form processing
with JavaScript, and for this I loop over all the forms in the
document. In order to identify them, I read their "name" property
(which sources from "name" HTML attribue). The problem is, that if the
form contains form control named "name", it overwrites the form name
property. In fact, I'm quite surprised that it's so easy to spoil any
of the form object properties - the form just needs to contain a field
named, say, "onsubmit", and - voila - it's done! Also, if the form
contains field "name", then attempting to assign another name to the
form object will result in error. Quite lame, if you ask me... The
field names shouldn't really matter.
Is there any other alternative way to read and write the form object
properties, if their name conflicts with the form field names?
Thank you,
Pavils