Lista,
Como atribuir o valor da [color=“red”]variavel id conforme especificado no comentário em vermelho abaixo?[/color]
Antedipadamente agradecido,
Marques
<%@ page language=“java” session=“true”
import=“br.com.datamed.service.<em>, br.com.datamed.data.</em>”
%>
<!DOCTYPE HTML PUBLIC “-//w3c//dtd html 4.0 transitional//en”>
<html>
<head>
<title>Medix</title>
</head>
<body bgcolor="#FFFFFF">
<p align=“center”><br>
<center>
<form method=“POST” name=“TesteSub” onsubmit=“return TestaVal()”
action=“index.jsp”><br>
Login:<input size=“20” type=“text” name=“login”><br><br>
Senha:<input size=“20” type=“password” name=“senha”><br><br><br>
<input type=“submit” name=“envia” value=“Enviar”>
<input size=“3” type=“Hidden” name=“corrente” value=“0”<br>
</form>
</center>
<script>
function TestaVal()
{
if (document.TesteSub.login.value == “”)
{
alert(“Campo Login não preenchido”)
return false
}
else if(document.TesteSub.senha.value == “”)
{
alert(“Campo Senha não Preenchido”)
return false
}
else
{
<%
[color=“red”]// Aquí eu quero obter o valor da variavel id digitado no campo login [/color]
UsuarioLocalHome usuarioHome = UsuarioUtil.getLocalHome();
UsuarioLocal usuario = usuarioHome.findByPrimaryKey(id);
session.setAttribute(“login”,“teste”);
%>
return true
}
}
</script>
</body>
</html>
