function cambia()
{
document.frmEnvio.msg.defaultValue ="<?php $hack=$_SESSION['red']; echo $hack;?>";
}
Obviamente llamo a la funcion desde un <a OnClick>, pero ahora ya no me funciona, con aterioridad habia utilizado esta funcion, y sin ningun motivo dejo de funcionar
![enojado](http://static.forosdelweb.com/fdwtheme/images/smilies/enojado.png)
Tambien lo he probado de la siguiente manera
function cambia()
{
var TEST='<?php $hack=$_SESSION['red']; echo $hack;?>'
document.frmEnvio.msg.defaultValue =(TEST);
}
Y tampoco me funciona, he probado quitar todo el codigo php (el cual tambien ya vi que esta bien), tanto a la variable TEST como directamente en el defaultValue, y si funciona la funcion.
Ahora bien, podria alguno de uds (como siempre lo hacen
![Aplauso](http://static.forosdelweb.com/fdwtheme/images/smilies/aplausos.gif)
![Porras](http://static.forosdelweb.com/fdwtheme/images/smilies/porra.gif)