Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Olá galera!!
Estou com um probleminha.
Tenho um sistema de notícias que rolam na vertical, até ai tudo bem. Só que gostaria de saber se há como ao clicar em determinada notícia abrir uma nova janela modal?
Poderia ser usando o jQuery ou outro componente, mas não estou conseguindo implantar.
Segue o código
index.asp
<!--#include file="config.asp"-->
<html>
<head>
<title><%=TS%></title>
<link rel="stylesheet" type="text/css" href="noticias.css">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
body,td,th {
font-size: 14px;
}
</style>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<table border="1" cellpadding="4" cellspacing="0" width="450" bordercolor="#000000" align="center">
<tr>
<td>
<table width="25%" border="0" align="left" cellpadding="0" cellspacing="0">
<tr>
<td align="center"><strong>Últimas Notícias</strong></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><a name= "scrollingCode"></a>
<marquee behavior= "scroll" align= "center" direction= "up" height="320" scrollamount= "3" scrolldelay= "90" onMouseOver='this.stop()' onMouseOut='this.start()'>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
<%
sqlstmt = "SELECT * FROM noticias ORDER BY data, id_noticia DESC"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sqlstmt, Dados, 3, 3
TotalRecs = rs.recordcount
x = 0
For x = 1 to 9999
If rs.eof then
Exit For
Else
date1 = rs("data")
id_noticia = rs("id_noticia")
name1 = rs("titulo")
link = "<a href='view.asp?id_noticia=" & id_noticia & "'>" & date1 & "</a>"
description = name1
%>
<tr>
<td height="2" valign="top" bgcolor="#FFFFFF"><p><font face="Geneva, Arial, Helvetica, san-serif" size="2" class="home">
<span class="home">
<img src="imagens/<%=rs("foto")%>" alt="" width="110" height="95" hspace="8" vspace="2" border="0" align="left">
<% =link %>
</span></font></p>
<p><font face="Geneva, Arial, Helvetica, san-serif" size="2" class="home"><span class="home">
<% =description%>
</span></font></p>
</tr>
<%
rs.MoveNext
End If
Next
%>
</table>
<tr>
<td>
<table width="25%" border="0" align="left" cellpadding="0" cellspacing="0">
<tr>
<td align="center"> </td>
</tr>
</table>
</td>
</tr>
</body>
</html>
view.asp
<!--#include file="config.asp"-->
<html>
<head>
<title><%=TS%></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="style.css" type="text/css" media="screen" />
<link rel="stylesheet" href="estilos.css" type="text/css" media="screen" />
</head>
<body text="#000000">
<% id_noticia = request.querystring("id_noticia")
sqlstmt = "SELECT * FROM noticias where id_noticia =" & id_noticia & " ORDER BY id_noticia DESC"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sqlstmt, Dados, 3, 3
TotalRecs = rs.recordcount
date1 = rs("data")
id_noticia = rs("id_noticia")
name1 = rs("titulo")
p1= rs("materia")
description = p1 %>
<table border="1" cellpadding="4" cellspacing="0" width="430" bordercolor="#000000" align="left">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center"><strong><%=name1%></strong></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<% if rs("foto") = "N" then %>
<img src="imagens/semfoto.gif" width="110" height="95" hspace="8" vspace="2" border="0" align="left">
<% else %>
<img src="imagens/<%=rs("foto")%>" border="0" align="left" hspace="8" vspace="2">
<% end if %>
<strong>Data:</strong> <%=date1%><br>
<br>
<%=description%> <br>
<br>
<br>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center"><form><input type="button" value=" Voltar "onclick="history.go(-1)"> </p></form></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
Obrigado a todos que puderem ajudar.
Carregando comentários...