JSP (Java Server Page) - alert y textarea. Ayuda!!!

 
Vista:

alert y textarea. Ayuda!!!

Publicado por marta (1 intervención) el 29/08/2007 12:36:00
Buenas!

Tengo la siguiente sentencia en javascript:
alert("que lleva en campo: " + "<%=DESG_DETALLE%>");

que me da error al ejecutar: campo.length es nulo o no es un objeto. Alguien sabe que es lo que está mal? Realmente la sentencia que quería ejecutar en un principio es la que está comentada de cargarTxtArea, pero como también me daba error, pues lo del alert.

El código completo es el siguiente:
<HTML>
<HEAD>

<%@ language="Java" %>
<%@ import="java.util.*" %>
<%@ import="paquete.*" %>
<%@ import="java.sql.*" %>
<%@ import="fra.*" %>
<%

String NSPA=(String)request.getAttribute("NSPA");
if ( NSPA== null ) {NSPA = request.getParameter("NSPA"); }

HttpSession sesion = request.getSession(false);

Properties ht= new Properties();
ht = (Properties)sesion.getValue("HT"+NSPA);

String CDVEZ = "";
String TRANSACCION = "";

String DESG_DETALLE = "";
String DESG_PIE = "";


if (ht != null)
{
CDVEZ = ht.getProperty("CDVEZ","0");
TRANSACCION = ht.getProperty("TRANSACCION", " ");

DESG_DETALLE = ht.getProperty("DESG_DETALLE","NO DISPONIBLE");
DESG_PIE = ht.getProperty("DESG_PIE","NO DISPONIBLE");

}
%>

<TITLE>Notas</TITLE>
<SCRIPT>

function Inicializar()
{

//document.all.TxtDetalle.value = cargarTxtArea("<%=DESG_DETALLE%>");
alert("que lleva en campo: " + "<%=DESG_DETALLE%>");

}
</SCRIPT>
.....
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder