Hello.
I have a Javascript function that validates an specific form. As
parameters this function receives an array of elements to be checked.
Depending on the form in cause, the array could have variable lenght.
I don't know how can i pass a dynamic array on 'onsubmit' event form
PHP code to a JavaScript function.
I would like to do something like:
<script>
function Valid_Form(ElementsArray)
{
alert (ElementsArray[0].value);
alert (ElementsArray[1].value);
return (true);
}
</script>
....
<?php
...
echo "<form method='post' action='?oper=confirm' onSubmit='return
Valid_Form(this.elements[0], this.elements[1])'>";
...
?>
But it don't work!
Anybody can help me please.
Thanks
Regards
Miguel