Salve a tutti,
ho un problema che non riesco a risolvere. posto qui sperando che qualcuno mi possa aiutare.
In una pagina ho un news reader. é collegato ad una tbl del db. La query viene svolta regolarmente e le news fatte scorrere a video.
Volevo fare in modo che cliccando sul testo delle news si aprisse una popup con il testo dell'articolo.
Nell header della pagina ho scritto:
<script language="JavaScript">
function ApriFinestra(str) {
larg=300;
alt=360;
toptop=(screen.height/2)-(alt/2);
leftleft=(screen.width/2)-(larg/2);
searchWin = window.open(str,'','top='+toptop+',left='+leftleft +',scrollbars=no,width='+larg+',height='+alt+',sta tus=no,location=no,toolbar=no');
}
</script>
dopo altre cose ho scritto:
Dim sTxt, iSpeed, iTop, iLeft, iWidth, iHeight, sHtml1, sHtml2, sHtml4, strSQL,sMarquee
Dim conCurrent
Dim rstCurrent
Set conCurrent = CreateObject("ADODB.Connection")
Set rstCurrent = Server.CreateObject("ADODB.Recordset")
conCurrent.Open ConnectionString
strSQL = "SELECT * FROM TBL_NEWS ORDER BY Entry_Date DESC"
Set rstCurrent = conCurrent.Execute(strSQL)
sHtml1 = "
<CENTER><FONT FACE='Tahoma' SIZE='-1' COLOR='Black'>"
10 sHtml2 = "<A HREF='news_detail.asp?ID="
11 sHtml3 = "'>"
Qui c'è il problema. non riesco a fargli accettare il link come scritto alle righe 12 e 13. Se, invece uso le righe 10 e 11 va tutto bene.
12 sHtml2 = "<A HREF='javascript:; onClick='ApriFinestra('news/news_detail.asp?ID="
13 sHtml3 = "');>"
sHtml4 = "</A></FONT></CENTER></P>"
sTxt = ""
rstCurrent.movefirst
do while not rstCurrent.eof
sTxt = sTxt & sHtml1 & rstCurrent("Entry_Date") & " - " & sHtml2 & _
rstCurrent("Entry_ID") & sHtml3 & rstCurrent("Title") & sHtml4
rstCurrent.movenext
loop
iSpeed = 40
iTop = 0
iLeft = 0
iWidth = 400
iHeight = 50
sMarquee="<MARQUEE onmouseover='this.stop();' " & _
"onmouseout='this.start();'direction='up' scrollamount='1' " & _
"scrolldelay='" & iSpeed & "' top='" & iTop & "' left='" & iLeft & _
"' width='" & iWidth & "' height='" & iHeight & "'>" & sTxt & "</MARQUEE>"
rstCurrent.close
set rstCurrent = Nothing
ConnectionString.Close
Set ConnectionString = Nothing
%>
Qualcuno di voi mi potrebbiutare, per favore? Grazie

Rispondi quotando