Título: duda con input box y javascript Publicado por: ^kazike^ en 22 Julio 2010, 16:20 pm Hola a todos!
Tengo un problemilla aver si m podeis ayudar a resolverlo: Tengo un form con un input box y lo que yo quiero es que cuando se pulsa el submit dependiendo del valor de unos radio buttons cambie el valor de ese input, pero no me esta funcionando. este es el codigo: Código: function getCheckEntries() el form { var checkaut = valButton(document.fw_upd_form.AutMan); if (checkaut=="Manual") { var valueChk = "Check_Manual"; document.getElementByName("value1").value = valueChk; } else if (checkaut=="Auto") { var valueChk = "Check_Auto"; document.getElementByName("value1").value = valueChk; } } Código: <form name="fw_upd_form" id="fw_upd_form" method="post" action="index.htm" enctype="application/x-www-form-urlencoded" onSubmit="getCheckEntries()"> He puesto solo las partes mas relevantes del codigo. <input type="hidden" name="value1" /> <tr> <td nowrap="nowrap" style="text-align:center;width:50px"> <input name="AutMan" value="Auto" type="radio" <%=(FwAutoUpgrade.getValue() == 1 ? "checked=\"checked\"" : "") %>/> </td> <td nowrap="nowrap" style="vertical-align:bottom;text-align:left">Automatic</td> </tr> <tr> <td nowrap="nowrap" style="text-align:center;width:50px"> <input name="AutMan" value="Manual" type="radio" <%=(FwAutoUpgrade.getValue() == 0 ? "checked=\"checked\"" : "") %>/> </td> <td nowrap="nowrap" style="vertical-align:bottom;text-align:left">Manual</td> </tr> Alguna idea? Gracias a todos por adelantado!! |