Hi there,
I am using dynamically generated forms with (unknown) unique names and id’s. When I want to pass the form id with javascript to a function, I receive a message from Chrome (in the javascript console) that it can not read the property id of null.
I investigated this some more, and found that chrome and firefox are not passing the parameter this.form to a function correctly.
A little sample code:
<FORM name=”[I]variablename[I]variablename
<input type=”text” name=”[I]variablename[I]variablename
</FORM>
(variablename stands for an automatically generated name which I can not literally state when calling the function)
The javascript function ‘test’ looks like this:
function test(form) {
var formid=form.id;
alert(formid);
}
Normaly a popup should arise stating the id of the form. In IE it works, but in Chrome and Firefox it doesn’t.
What am I doing wrong here? ?