Cita:
Iniciado por yeti nada, me da error y al principio de la funcion tengo dos "alert" para ver si recoge los valores:
y? los recojes??... lo dices como si no... le agregaste los id's a los textarea como te lo mencioné??... fuera de eso.. no hay mayor problema:
Código HTML:
<html><head>
<script language="javascript">
function cal(p1, p2) {
alert(p1);
alert(p2);
}
</script>
</head><body><form>
<input name="p1" id="p1" type="text">
<input name="p2" id="p2" type="text">
<input type="button" name="b1" value="TRANSFORMAR" onClick="cal(getElementById('p1').value, getElementById('p2').value)">
</form></body></html>