Hallo,

I want to use an array of fieldnames for form validation like:

PHP:

function CheckForm(theform) {

req_velden = new Array("bedrijf","contact","adres","plaats","postcode","land","telefoon");

for (var i = 0; i < req_velden.length; i++) {

var field = theform.req_velden[i];




I use the event "onsubmit="CheckForm(this)" in the form-tag to call the function.

the output with "alert(field)" doesn't work. I get en error in the debugger like:

Error: theform.req_velden has no properties
Source File: http://localhost/sparts/genHtml/tes...land=&telefoon=
Line: 11

What is wrong here?