Olá pessoal, quero que quando eu passar o mouse em cima da letra mostre o nome e ao clicar ir para pagina de consulta.
Não estou conseguindo pegar o nome pelo resultset.
O codigo segue abaixo.
Valeu Galera!!!
<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Agenda de Contatos</title>
<style type="text/css">
.Alinhar {
text-align: center;
font-size: xx-large;
color: #000;
font-weight: bold;
}
.AZ {
font-weight: normal;
font-size: 18px;
color: #666;
}
</style>
</head>
<body class="Alinhar">
<%
try
{
Class.forName("com.mysql.jdbc.Driver");
Connection Conexao = DriverManager.getConnection("jdbc:mysql://localhost:3306/Agenda", "root", "root");
Statement ST = Conexao.createStatement();
ResultSet RS = ST.executeQuery("select * from Contatos");
}
catch(ClassNotFoundException erroClass)
{
out.print("Erro Driver: "+erroClass);
}
catch(SQLException erroSQL)
{
out.print("Erro no Banco: "+erroSQL)
}
%>
<p>Agenda de Contatos</p>
<form id="form1" name="form1" method="post" action="AlterarCadastro.jsp">
<table width="10" border="0" align="center">
<tr>
<th><script type="text/javascript" src="Scripts/standardclock1.js"></script></th>
</tr>
</table>
<p ><a nome")%>">A</a> B C D E F G H I J K L M N O P Q R S T U V X Y W Z Todos</p>
<p > </p>
<p><a ><img /></a></p>
<p> </p>
</form>
<p> </p>
</body>
</html>
… mesmo para fazer lógica de tela fica mais elegante usar tags (criando suas taglibs ou usando jstl ou outra coisa), pois html é linguagem de marcação e tags se “encaixam” melhor…