problem of javascript with dropdown list of array.

From: Date: Mon, 04 Nov 2002 12:40:07 +0000
Subject: problem of javascript with dropdown list of array.
Groups: php.general 
Request: Send a blank email to php-general+get-122930@lists.php.net to get a copy of this message
i have a problem with the dropdown list when proccesing with javascript, the name of the dropdown list is "select02[]", this because to that i need it passed in php a array of the selecteds item, for example : $form[select02][$i],..but i wish to fill the dropdown list from javascript and later submit, but it is not function, i suppose that the name of the dropdown list is not valid name for javascript. anybody can help me? the function of javascript: function one2two(m1,m2) { m1text = m1.value; if (m1text != "" ) { m2len = m2.length; m2.options[m2len]= new Option(m1text); m2.options[m2len].value = m1text; m1.value = ""; } ----------------------------------------------------------- the form with the events: <form name="entryform" enctype="multipart/form-data" method="post" action="/ayni2/admin2/producto.php"> <select name="select02[]" size="5" multiple></select> <input type="text" name="text01"> <input name="button" type="button" onClick="one2two(text01, select02)" value=" insertar "> <input type="button" onClick="borrar(select02)" value=" borrar ">

« previous php.general (#122930) next »