Hola...
Tengo varios arreglos de controles que necesito validar según el item del arreglo.
El arreglo consiste en 5 controles <select class='select' size='1' name='habi[0]' id='habi[0]'...
donde el nombre del control y el id está formado por un arreglo, todos ellos están dentro de un <form, necesito mostrar un cartel que muestre al usuario que debe llenar todos los controles de un arreglo si al menos llenó uno.
Es decir si el usuario solo seleccionó un dato del <select class='select' size='1' name='habi[0]' id='habi[0]'... debe seleccionar un dato del siguiente select <select class='select' size='1' name='meal[0]' id='meal[0]'...
y no tendrá que seleccionar los datos del próximo arreglo <select class='select' size='1' name='habi[1]' id='habi[1]'...
<select class='select' size='1' name='meal[1]' id='meal[1]'...
Por favor, agradezco la ayuda con un poco de código ya que no soy bueno en JavaScript... gracias
pd: les muestro el código
<form name='form' id='form' action='http://exoops/modules/reserva/index.php?op=add' method='post'><table border='1' width='100%'><link rel="stylesheet" type="text/css" media="all" href="http://exoops/modules/hotels/include/calendar-blue.css" />
<table width="100%" border="0" cellspacing="1" cellpadding="0"><tr class="bg2">
<td valign="top">
<table width="100%" border="0" cellspacing="1" cellpadding="8"><tr class="bg1">
<td valign="top">
<!-- HTML CODE -->
<table width="75%" border="1">
<tr>
<td colspan="3">Room Type</td>
</tr>
<tr>
<td>Room Type</td>
<td> </td>
<td><select class='select' size='1' name='habi[0]' id='habi[0]'><option value='0'>Select Rooms type</option><option value='1'>Standard</option></select></td>
</tr>
<tr>
<td>Meal Plan</td>
<td> </td>
<td><select class='select' size='1' name='meal[0]' id='meal[0]'><option value='0'>Select Meal Plan</option><option value='1'>Breakfast Include</option></select></td>
</tr>
<tr>
<td>adults/children</td>
<td> </td>
<td><select class='select' size='1' name='ocup[0]' id='ocup[0]'><option value='0|0'>Select occupy</option><option value='1|0'>1 Adult/ no Children</option><option value='2|0'>2 Adults/ no Children</option><option value='3|0'>3 Adults/ no Children</option><option value='1|1'>1 Adult/ 1 Child</option><option value='2|1'>2 Adults/ 1 Child</option><option value='0|2'>no Adult/ 2 Child</option><option value='1|2'>1 Adults/ 2 Child</option></select></td>
</tr>
<tr>
<td>Check-in date</td>
<td> </td>
<td><input onfocus='return showCalendar("date[0]");' class='select' type='text' name='date[0]' id='date[0]' size='15' maxlength='25' value='2004-08-04' /><input class='button' type='reset' value=' ... ' onclick='return showCalendar("date[0]");'></td>
</tr>
<tr>
<td># of Nigths</td>
<td> </td>
<td><select class='select' size='1' name='coun[0]' id='coun[0]'><option value='0'>0</option><option value='1'>1</option><option value='2'>2</option><option value='3'>3</option><option value='4'>4</option><option value='5'>5</option><option value='6'>6</option><option value='7'>7</option><option value='8'>8</option><option value='9'>9</option><option value='10'>10</option><option value='11'>11</option><option value='12'>12</option><option value='13'>13</option><option value='14'>14</option><option value='15'>15</option><option value='16'>16</option><option value='17'>17</option><option value='18'>18</option><option value='19'>19</option><option value='20'>20</option><option value='21'>21</option><option value='22'>22</option><option value='23'>23</option><option value='24'>24</option><option value='25'>25</option><option value='26'>26</option><option value='27'>27</option><option value='28'>28</option><option value='29'>29</option></select></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td><input type='button' class='button' name='check' id='check' value='Check rates' onClick="this.form.action='index.php?pa=reserva&li d=3&itemName=0';this.form.submit()" /></td>
</tr>
<tr>
<td>subTotal</td>
<td> </td>
<td>0.00</td>
</tr>
</table>
<!-- HTML CODE -->
</td></tr></table>
</td></tr></table>
<!-- HTML CODE -->
<!-- HTML CODE -->
<table width="100%" border="0" cellspacing="1" cellpadding="0"><tr class="bg2">
<td valign="top">
<table width="100%" border="0" cellspacing="1" cellpadding="8"><tr class="bg1">
<td valign="top">
<!-- HTML CODE -->
<table width="75%" border="1">
<tr>
<td colspan="3">Room Type</td>
</tr>
<tr>
<td>Room Type</td>
<td> </td>
<td><select class='select' size='1' name='habi[1]' id='habi[1]'><option value='0'>Select Rooms type</option><option value='1'>Standard</option></select></td>
</tr>
<tr>
<td>Meal Plan</td>
<td> </td>
<td><select class='select' size='1' name='meal[1]' id='meal[1]'><option value='0'>Select Meal Plan</option><option value='1'>Breakfast Include</option></select></td>
</tr>
<tr>
<td>adults/children</td>
<td> </td>
<td><select class='select' size='1' name='ocup[1]' id='ocup[1]'><option value='0|0'>Select occupy</option><option value='1|0'>1 Adult/ no Children</option><option value='2|0'>2 Adults/ no Children</option><option value='3|0'>3 Adults/ no Children</option><option value='1|1'>1 Adult/ 1 Child</option><option value='2|1'>2 Adults/ 1 Child</option><option value='0|2'>no Adult/ 2 Child</option><option value='1|2'>1 Adults/ 2 Child</option></select></td>
</tr>
<tr>
<td>Check-in date</td>
<td> </td>
<td><input onfocus='return showCalendar("date[1]");' class='select' type='text' name='date[1]' id='date[1]' size='15' maxlength='25' value='2004-08-04' /><input class='button' type='reset' value=' ... ' onclick='return showCalendar("date[1]");'></td>
</tr>
<tr>
<td># of Nigths</td>
<td> </td>
<td><select class='select' size='1' name='coun[1]' id='coun[1]'><option value='0'>0</option><option value='1'>1</option><option value='2'>2</option><option value='3'>3</option><option value='4'>4</option><option value='5'>5</option><option value='6'>6</option><option value='7'>7</option><option value='8'>8</option><option value='9'>9</option><option value='10'>10</option><option value='11'>11</option><option value='12'>12</option><option value='13'>13</option><option value='14'>14</option><option value='15'>15</option><option value='16'>16</option><option value='17'>17</option><option value='18'>18</option><option value='19'>19</option><option value='20'>20</option><option value='21'>21</option><option value='22'>22</option><option value='23'>23</option><option value='24'>24</option><option value='25'>25</option><option value='26'>26</option><option value='27'>27</option><option value='28'>28</option><option value='29'>29</option></select></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td><input type='button' class='button' name='check' id='check' value='Check rates' onClick="this.form.action='index.php?pa=reserva&li d=3&itemName=1';this.form.submit()" /></td>
</tr>
<tr>
<td>subTotal</td>
<td> </td>
<td>0.00</td>
</tr>
</table>
<!-- HTML CODE -->
</td></tr></table>
</td></tr></table>
<!-- HTML CODE -->
<input type='hidden' name='countForma' id='countForma' value='2' /><input type='hidden' name='lid' id='lid' value='3' /><input type='hidden' name='nombHotel' id='nombHotel' value='Plaza' /><input type='button' class='button' name='add' id='add' value='Add' onClick="this.form.action='http://exoops/modules/reserva/index.php?op=add';this.form.submit()" /></table></form>