webForumDet fria alternativet

öppna i rätt frame

ASP

1 svar · 159 visningar · startad av aDay

Medlem sedan juli 200391 inlägg
Frågan#1

hur ska jag få länke på rad 58 att öppnas i "main", använder alltså frames...

%>

<table cellpadding="3" cellspacing="1" width="130">
 <tr>
  <td align="center" height="15">Senaste foruminlägg</td>
 </tr>
 <tr>
  <td width="33%" align="center" nowrap height="25">
<%
Dim rsLastestPostsMod
Dim adoLastestPostsModCon
Dim strLastestPostsModCon
Dim strSQLLastsPostsMod
Dim strLastestPostsModTopicSubject
Dim strMembersModForumPath

'The path to the forum
strMembersModForumPath = "../forum/"

'Database connection
'-----------------------------
'-----------------------------

'Default connection
strLastestPostsModCon = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("admin/database/wwforum.mdb")

'Uncomment for a full phsyical path. Then change the path
'strLastestPostsModCon = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=http://www.project15.org/scripts/webwizforum/forum/admin/database/wwforum.mdb"

'Uncomment for a DSN connection
'strLastestPostsModCon = "DSN=DSN_NAME"

'-----------------------------
'-----------------------------

Set adoLastestPostsModCon = Server.CreateObject("ADODB.Connection")
adoLastestPostsModCon.Open strLastestPostsModCon

Set rsLastestPostsMod = Server.CreateObject("ADODB.Recordset")

strSQLLastsPostsMod = "SELECT Top 2 tblTopic.Topic_ID, tblTopic.Subject, tblForum.Forum_ID "
strSQLLastsPostsMod = strSQLLastsPostsMod & "FROM tblForum INNER JOIN tblTopic ON tblForum.Forum_ID = tblTopic.Forum_ID "
strSQLLastsPostsMod = strSQLLastsPostsMod & "WHERE ((tblForum.Password) Is Null) "
strSQLLastsPostsMod = strSQLLastsPostsMod & "ORDER BY tblTopic.Last_entry_date DESC;"

rsLastestPostsMod.Open strSQLLastsPostsMod, adoLastestPostsModCon

If rsLastestPostsMod.EOF Then
	Response.Write "<span class=""smltext"">No Forum Posts Made</span>"
Else
	Do while NOT rsLastestPostsMod.EOF
		If len(rsLastestPostsMod("Subject")) > 18 then
			strLastestPostsModTopicSubject = left(rsLastestPostsMod("Subject"),18) & "...&nbsp;"
		Else
			strLastestPostsModTopicSubject = rsLastestPostsMod("Subject")
		End If

		Response.Write("<a href=""" & strMembersModForumPath & "forum_posts.asp?TID=" & rsLastestPostsMod("Topic_ID") & "&PN=1"">" & strLastestPostsModTopicSubject & "</a>")

	rsLastestPostsMod.MoveNext
	If NOT rsLastestPostsMod.EOF Then Response.Write("<br>")
	Loop
End If

'Reset Server Objects
rsLastestPostsMod.Close
Set rsLastestPostsMod = Nothing
adoLastestPostsModCon.Close
Set adoLastestPostsModCon = Nothing
%></td>
 </tr>
</table>
Medlem sedan juni 200032 967 inlägg
#2

Är detta rad 58?

Response.Write("<a href=""" & strMembersModForumPath & "forum_posts.asp?TID=" & rsLastestPostsMod("Topic_ID") & "&PN=1"">" & strLastestPostsModTopicSubject & "</a>")

I så fall, lägg till target i länken.

Response.Write("<a href=""" & strMembersModForumPath & "forum_posts.asp?TID=" & rsLastestPostsMod("Topic_ID") & "&PN=1"" target=""main"">" & strLastestPostsModTopicSubject & "</a>")
249 ms totalt · 4 externa anrop · v20260731065814-full.1dc6f849
125 ms — deklarationer (db)
0 ms — hämta statistik (cache)
122 ms — hämta tråd, inlägg och bilagor (db)
118 ms — ändringar (db)