Ver Mensaje Individual
  #11 (permalink)  
Antiguo 05/11/2010, 20:45
hicetnunc86
 
Fecha de Ingreso: octubre-2010
Mensajes: 9
Antigüedad: 13 años, 6 meses
Puntos: 0
Respuesta: redireccionar presionando radiobutton

Cita:
Iniciado por hicetnunc86 Ver Mensaje
htmls
Cita:
Iniciado por hicetnunc86 Ver Mensaje
a los que les interese les dejo la solución que hallé.

codigo HTML:
<body>
<script language="JavaScript" src="../js/jquery.js">
</script>

<script>
$(document).ready(function (){
$("#enviar").click( function() { $("#formulario").hide();
if($("#Cnatural").attr('checked')) {
var opc = "natu";
}
if($("#Cempresa").attr("checked")) {
var opc = "empr";
}
if($("#Cfuncionarios").attr("checked")) {
var opc = "func";
}

$.ajax({
type: 'POST',
url: 'html2/prueba.php',
data: 'opc='+opc,
success: function(datos){
$("#resu").html(datos);
}
});




});
});
</script>
<div id="formulario">
<form id="form12" method="post" action="" >
<label>
<input name="radiobutton" id ="Cnatural" type="radio" value="radio1" />
Cliente Natural</label>
<a href="Formulario_Usuario.html"></a>
<br>


<label>
<input name="radiobutton" id ="Cempresa" type="radio" value="radio2" />
Empresa</label>
<a href="Formulario_Empresas.html"></a>
<br>
<tr>
<td>
<label>
<input name="radiobutton" id ="Cfuncionarios" type="radio" value="radio3" />
Funcionario</label>
</td>
</tr>
<tr>
<td height="34">&nbsp;</td>
<td width="6">&nbsp;</td>
<td width="197"><input type="button" name="btn1" value="Aceptar" id="enviar">
<input type="submit" name="Submit2" value="Cancelar"/></td>
</tr>
</form>
</div>
<div id ="resu">fdgdf
</div>
</body>
</html>