Sun 10 Sep 2006 08:42:11
ขอรบกวนช่วยดูโค้ดให้หน่อยนะครับเรื่องของการกด next และ back รูปภาพ ตอนนี้กด next และ back ได้แล้วแต่ติดตรงที่ถ้ากดไปเรื่อยๆ หากรูปภาพหมดในหมวดนี้มันจะขึ้น Error ครับ คือมันไม่ Enable ครับ
**************************************************************
<%
if Request.Querystring("strID")="" then
sid="1"
else
sid=Request.Querystring("strID")
end if
strAction1=sid-1
strAction2=sid+1
artcatid = Request.QueryString("strartid")
Set rsCate = Server.CreateObject("ADODB.RecordSet")
Set rsCount=Server.CreateObject("ADODB.Recordset")
sql ="Select * From TblShowArt where SID='"& sid & "' and ArtCatID='"& artcatid & "' order by SImage desc"
rsCate.Open Sql, Connart, 0, 3
sql1="SELECT * FROM QrCountShowArt where ArtCatID='"& artcatid & "'"
rsCount.Open Sql1, Connart, 0, 3
strTotal=rsCount("CountSID")
rsCount.Close
if rsCate("SID")=strTotal then
strEnd=true
end if
if strAction1<>0 then ' ===================================================================== Previous
strPrev="<a href=""view.asp?strID="&strAction1&"&strartid="&artcatid&""" title=""vorheriges Bild"">< Previous</a>"
else
strPrev="<span class=""text5"">< Previous</span>"
end if
if strEnd=true then ' =========================================================================== Next
strNext="<span class=""text5"">Next ></span>"
else
strNext="<a href=""view.asp?strID="&strAction2&"&strartid="&artcatid&""" title=""nächstes Bild"">Next ></a>"
end if
strHome="<a href=""view.asp?strID=1"" title=""Home"">Home</a>" ' ============================ Home
' ================================================================= End: Navigation Previous/Next/Home
strToTImages=rsCate("SID")&" / "&strTotal
**********************************************************
กรุณาช่วยหน่อยครับ...ขอบคุณล่วงหน้าครับผม
strNext="<span class=""text5"">Next ></span>"
else
strNext="<a href=""view.asp?strID="&strAction2&"&strartid="&artcatid&""" title=""nächstes Bild"">Next ></a>"
end if
อยู่ตรงที่ Hilight ไว้นั่นล่ะครับ แต่ก็ถูกแล้วนี่ครับเมื่อรูปหมดก็ควร Disable เอาไว้ไม่อย่างนั้นอาจจะ Error ได้ครับ

















