Forum Moderators: open
I want to validate the select data with javascript before posting using DOM. (I've named the form "formname".)
for (ndx = 0; ndx < document.formname.ids.length; ndx++) {
if (document.formname.ids[ndx] == 'dude') // do something
}
It seems javascript needs the name without the brackets for DOM array access.
ex: <select name="ids">
How can I create a select multiple form element accessible through both javascript and then through the $_POST in PHP upon submission? It seems the two languages are in conflict when it comes to form arrays.