Código:
El proble esta en que al pulsar sobre votar el mensaje que me da es: El id es: undefined<Script languague="JavaScript"> function votar(id) { alert("El id es: " + id); } </Script> <form name="survey" action="#" OnSubmit="votar(document.survey.respuesta.value)"> <table border="0" cellpadding="0" cellspacing="0" width="600"> <tr> <td width="10" bgcolor="#91AAC1"></td> <td width="5"> </td> <td width="30" bgcolor="#91AAC1"></td> <td width="5"> </td> <td width="500" bgcolor="#91AAC1"><center><b><u>Pregunta</u></b></td> <td width="5"> </td> <td width="30" bgcolor="#91AAC1"></td> <td width="5"> </td> <td width="10" bgcolor="#91AAC1"></td> </tr> </table> <table border="0" cellpadding="0" cellspacing="0" width="600"> <tr> <td width="10" bgcolor="#91AAC1"></td> <td width="5"> </td> <td width="30" bgcolor="#91AAC1"></td> <td width="5"> </td> <td width="20" bgcolor="#DBE7F3"><center><input type="radio" name="respuesta" value="1"></td> <td width="5"> </td> <td width="475" bgcolor="#DBE7F3"> · Opcion 1</td> <td width="5"> </td> <td width="30" bgcolor="#91AAC1"></td> <td width="5"> </td> <td width="10" bgcolor="#91AAC1"></td> </tr> </table> <table border="0" cellpadding="0" cellspacing="0" width="600"> <tr> <td width="10" bgcolor="#91AAC1"></td> <td width="5"> </td> <td width="30" bgcolor="#91AAC1"></td> <td width="5"> </td> <td width="20" bgcolor="#DBE7F3"><center><input type="radio" name="respuesta" value="2"></td> <td width="5"> </td> <td width="475" bgcolor="#DBE7F3"> · Opcion 2</td> <td width="5"> </td> <td width="30" bgcolor="#91AAC1"></td> <td width="5"> </td> <td width="10" bgcolor="#91AAC1"></td> </tr> </table> <table border="0" cellpadding="0" cellspacing="0" width="600"> <tr> <td width="10" bgcolor="#91AAC1"></td> <td width="5"> </td> <td width="30" bgcolor="#91AAC1"></td> <td width="5"> </td> <td width="20" bgcolor="#DBE7F3"><center><input type="radio" name="respuesta" value="3"></td> <td width="5"> </td> <td width="475" bgcolor="#DBE7F3"> · Opcion 3</td> <td width="5"> </td> <td width="30" bgcolor="#91AAC1"></td> <td width="5"> </td> <td width="10" bgcolor="#91AAC1"></td> </tr> </table> <table border="0" cellpadding="0" cellspacing="0" width="600"> <tr> <td width="10" bgcolor="#91AAC1"></td> <td width="5"> </td> <td width="30" bgcolor="#91AAC1"></td> <td width="5"> </td> <td width="500" bgcolor="#91AAC1"><center><input type="submit" value="Votar"></td> <td width="5"> </td> <td width="30" bgcolor="#91AAC1"></td> <td width="5"> </td> <td width="10" bgcolor="#91AAC1"></td> </tr> </table> </form>
Donde esta el fallo?