Avatar billede webbygger Nybegynder
13. november 2003 - 20:37 Der er 11 kommentarer og
1 løsning

Gallery problemer !

Hejsa !

Jeg sidder og roder med dette gallery http://web-byggeren.dk kik på designgalleri som jeg har fundet på nettet..

Jeg har dog lavet nogle tilpasning, men der er godt nok en jeg ikke kan klare og det er :

Jeg kunne godt tænke mig, billeder på række med 2-3 stk. på hver række og derpå start den på en ny rækker....!

Har jeg gjort mig forståligt ?

Her er siden :

<html>

<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
<title>Gallery</title>

<SCRIPT>
<!--
function displayWindow(url, width, height)
{
var Win = window.open(url,"displayWindow",'width=' + width + ',height=' + height + ',resizable=no,scrollbars=no,menubar=no,status=no' );
}
//-->
</SCRIPT>


</head>

<body bgcolor="#000000">
<%
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath ("/database/gallery.mdb")
strSQL = "Select * From Images"
Set RS = Conn.Execute(strSQL)

countSQL = "Select Count(ID) As Count From Images"
RS2 = Conn.Execute(countSQL)
%>
<table border="0" cellpadding="0" cellspacing="0" width="40%">
    <tr>
        <td width="100%" align="center"><font size="1" face="Verdana"><strong><%= RS2("Count")%> </strong>images in database</font></td>
    </tr>
</table>
<br>
<% Do While Not rs.EOF %>

<table border="0" cellpadding="0" cellspacing="4" width="40%" bgcolor="#000000">
  <tr>
        <td rowspan="3" width="25%">
        <A HREF="java script:displayWindow('showimg.asp?id=<%=RS("ID")%>',<%=RS("Width")%>,<%=RS("Height")%>)">
        <img src="images/<%=RS("Images")%>.<%=RS("Filtype")%>" height=100 width=70 border=0></a></td>
        <td width="75%"><font size="1" face="Tahoma">Filtype: <strong><%= RS("Filtype")%></strong></font></td>
    </tr>
    <tr>
        <td width="75%"><font size="1" face="Tahoma">Højde: <strong><%= RS("Height")%></strong>px Bredde: <strong><%= RS("Width")%></strong>px</font></td>
    </tr>
    <tr>
        <td width="75%"><font color="#FFFFFF" size="1" face="Tahoma">Billed: <strong><%= RS("Description")%></strong> </font></td>
    </tr>
</table>

<%
RS.MoveNext
Loop
Conn.Close
Set Conn = Nothing
%><font size="1" face="Verdana">
</body>
</html>


mvh

web-byggeren
Avatar billede ellebaek Nybegynder
13. november 2003 - 21:55 #1
<table>
<%
i = 0
Do While Not rs.EOF
if i mod 3 = 0 then
response.write "<tr>"
end if
%>
<table border="0" cellpadding="0" cellspacing="4" width="40%" bgcolor="#000000">
  <tr>
        <td rowspan="3" width="25%">
        <A HREF="java script:displayWindow('showimg.asp?id=<%=RS("ID")%>',<%=RS("Width")%>,<%=RS("Height")%>)">
        <img src="images/<%=RS("Images")%>.<%=RS("Filtype")%>" height=100 width=70 border=0></a></td>
        <td width="75%"><font size="1" face="Tahoma">Filtype: <strong><%= RS("Filtype")%></strong></font></td>
    </tr>
    <tr>
        <td width="75%"><font size="1" face="Tahoma">Højde: <strong><%= RS("Height")%></strong>px Bredde: <strong><%= RS("Width")%></strong>px</font></td>
    </tr>
    <tr>
        <td width="75%"><font color="#FFFFFF" size="1" face="Tahoma">Billed: <strong><%= RS("Description")%></strong> </font></td>
    </tr>
</table>

<%
i = i+1
if i mod 3 = 0 then
response.write "</tr>"
end if
RS.MoveNext
Loop
Conn.Close
Set Conn = Nothing
%>

Noget i denne stil måske istedet for den kode du har i forvejen mellem <% Do While Not rs.EOF %>
og <%
RS.MoveNext
Loop
Conn.Close
Set Conn = Nothing
%>
Avatar billede webbygger Nybegynder
14. november 2003 - 13:30 #2
Ellebaek > HMmm jeg kan desværre ikke får det til at virke http://web-byggeren.dk/gallery1.asp og

/gallery1.asp, line 83 = Set Conn = Nothing....

Jeg kan ikke se hvad der gal med den - kan Du ?
Avatar billede ellebaek Nybegynder
14. november 2003 - 18:42 #3
<table>
<%
i = 0
While Not rs.EOF
if i mod 3 = 0 then
response.write "<tr>"
end if
%>
<table border="0" cellpadding="0" cellspacing="4" width="40%" bgcolor="#000000">
  <tr>
        <td rowspan="3" width="25%">
        <A HREF="java script:displayWindow('showimg.asp?id=<%=RS("ID")%>',<%=RS("Width")%>,<%=RS("Height")%>)">
        <img src="images/<%=RS("Images")%>.<%=RS("Filtype")%>" height=100 width=70 border=0></a></td>
        <td width="75%"><font size="1" face="Tahoma">Filtype: <strong><%= RS("Filtype")%></strong></font></td>
    </tr>
    <tr>
        <td width="75%"><font size="1" face="Tahoma">Højde: <strong><%= RS("Height")%></strong>px Bredde: <strong><%= RS("Width")%></strong>px</font></td>
    </tr>
    <tr>
        <td width="75%"><font color="#FFFFFF" size="1" face="Tahoma">Billed: <strong><%= RS("Description")%></strong> </font></td>
    </tr>
</table>

<%
i = i+1
if i mod 3 = 0 then
response.write "</tr>"
end if
RS.MoveNext
wendConn.Close
Set Conn = Nothing
%>


prøv dette i stedet...!
Avatar billede webbygger Nybegynder
14. november 2003 - 19:25 #4
Hmm det flyttede bare fejlen hertil :

Microsoft VBScript compilation error '800a03fa'

Expected 'Wend'

/gallery1.asp, line 82
Avatar billede webbygger Nybegynder
14. november 2003 - 19:26 #5
Siden ser sådan ud nu :

<html>

<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
<title>Gallery</title>

<style type="text/css">
body,html {
scrollbar-arrow-color: #ffffff;
scrollbar-base-color: #000000;
scrollbar-dark-shadow-color: #ffffff;
scrollbar-3dlight-color: #ffffff;
scrollbar-face-color: #000000;
scrollbar-highlight-color: #000000;
scrollbar-shadow-color: #ffffff;

}
</style>
<SCRIPT>
<!--
function displayWindow(url, width, height)
{
var Win = window.open(url,"displayWindow",'width=' + width + ',height=' + height + ',resizable=no,scrollbars=no,menubar=no,status=no' );
}
//-->
</SCRIPT>


</head>

<body bgcolor="#000000">
<%
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath ("/database/gallery.mdb")
strSQL = "Select * From Images"
Set RS = Conn.Execute(strSQL)

countSQL = "Select Count(ID) As Count From Images"
RS2 = Conn.Execute(countSQL)
%>
<table border="0" cellpadding="0" cellspacing="0" width="40%">
    <tr>
        <td width="100%" align="center"><font size="1" face="Verdana"><strong><%= RS2("Count")%> </strong>images in database</font></td>
    </tr>
</table>
<br>
<% Do While Not rs.EOF %>

<table>
<%
i = 0
While Not rs.EOF
if i mod 3 = 0 then
response.write "<tr>"
end if
%>
<table border="0" cellpadding="0" cellspacing="4" width="40%" bgcolor="#000000">
  <tr>
        <td rowspan="3" width="25%">
        <A HREF="java script:displayWindow('showimg.asp?id=<%=RS("ID")%>',<%=RS("Width")%>,<%=RS("Height")%>)">
        <img src="images/<%=RS("Images")%>.<%=RS("Filtype")%>" height=100 width=70 border=0></a></td>
        <td width="75%"><font size="1" face="Tahoma">Filtype: <strong><%= RS("Filtype")%></strong></font></td>
    </tr>
    <tr>
        <td width="75%"><font size="1" face="Tahoma">Højde: <strong><%= RS("Height")%></strong>px Bredde: <strong><%= RS("Width")%></strong>px</font></td>
    </tr>
    <tr>
        <td width="75%"><font color="#FFFFFF" size="1" face="Tahoma">Billed: <strong><%= RS("Description")%></strong> </font></td>
    </tr>
</table>

<%
i = i+1
if i mod 3 = 0 then
response.write "</tr>"
end if
RS.MoveNext
wendConn.Close
Set Conn = Nothing
%>

<font size="1" face="Verdana">
</body>
</html>
Avatar billede ellebaek Nybegynder
14. november 2003 - 19:29 #6
<html>

<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
<title>Gallery</title>

<style type="text/css">
body,html {
scrollbar-arrow-color: #ffffff;
scrollbar-base-color: #000000;
scrollbar-dark-shadow-color: #ffffff;
scrollbar-3dlight-color: #ffffff;
scrollbar-face-color: #000000;
scrollbar-highlight-color: #000000;
scrollbar-shadow-color: #ffffff;

}
</style>
<SCRIPT>
<!--
function displayWindow(url, width, height)
{
var Win = window.open(url,"displayWindow",'width=' + width + ',height=' + height + ',resizable=no,scrollbars=no,menubar=no,status=no' );
}
//-->
</SCRIPT>


</head>

<body bgcolor="#000000">
<%
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath ("/database/gallery.mdb")
strSQL = "Select * From Images"
Set RS = Conn.Execute(strSQL)

countSQL = "Select Count(ID) As Count From Images"
RS2 = Conn.Execute(countSQL)
%>
<table border="0" cellpadding="0" cellspacing="0" width="40%">
    <tr>
        <td width="100%" align="center"><font size="1" face="Verdana"><strong><%= RS2("Count")%> </strong>images in database</font></td>
    </tr>
</table>
<br>

<table>
<%
i = 0
While Not rs.EOF
if i mod 3 = 0 then
response.write "<tr>"
end if
%>
<table border="0" cellpadding="0" cellspacing="4" width="40%" bgcolor="#000000">
  <tr>
        <td rowspan="3" width="25%">
        <A HREF="java script:displayWindow('showimg.asp?id=<%=RS("ID")%>',<%=RS("Width")%>,<%=RS("Height")%>)">
        <img src="images/<%=RS("Images")%>.<%=RS("Filtype")%>" height=100 width=70 border=0></a></td>
        <td width="75%"><font size="1" face="Tahoma">Filtype: <strong><%= RS("Filtype")%></strong></font></td>
    </tr>
    <tr>
        <td width="75%"><font size="1" face="Tahoma">Højde: <strong><%= RS("Height")%></strong>px Bredde: <strong><%= RS("Width")%></strong>px</font></td>
    </tr>
    <tr>
        <td width="75%"><font color="#FFFFFF" size="1" face="Tahoma">Billed: <strong><%= RS("Description")%></strong> </font></td>
    </tr>
</table>

<%
i = i+1
if i mod 3 = 0 then
response.write "</tr>"
end if
RS.MoveNext
wend
Conn.Close
Set Conn = Nothing
%>

<font size="1" face="Verdana">
</body>
</html>

Sådan der... Det burde virke!
Avatar billede webbygger Nybegynder
14. november 2003 - 19:34 #7
Nu kan den da vise siden http://web-byggeren.dk/gallery1.asp MEN den har ikke listede billeder op på vandret række ?
Avatar billede ellebaek Nybegynder
14. november 2003 - 19:43 #8
Glamte lige <td>erne ;-)
<html>

<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
<title>Gallery</title>

<style type="text/css">
body,html {
scrollbar-arrow-color: #ffffff;
scrollbar-base-color: #000000;
scrollbar-dark-shadow-color: #ffffff;
scrollbar-3dlight-color: #ffffff;
scrollbar-face-color: #000000;
scrollbar-highlight-color: #000000;
scrollbar-shadow-color: #ffffff;

}
</style>
<SCRIPT>
<!--
function displayWindow(url, width, height)
{
var Win = window.open(url,"displayWindow",'width=' + width + ',height=' + height + ',resizable=no,scrollbars=no,menubar=no,status=no' );
}
//-->
</SCRIPT>


</head>

<body bgcolor="#000000">
<%
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath ("/database/gallery.mdb")
strSQL = "Select * From Images"
Set RS = Conn.Execute(strSQL)

countSQL = "Select Count(ID) As Count From Images"
RS2 = Conn.Execute(countSQL)
%>
<table border="0" cellpadding="0" cellspacing="0" width="40%">
    <tr>
        <td width="100%" align="center"><font size="1" face="Verdana"><strong><%= RS2("Count")%> </strong>images in database</font></td>
    </tr>
</table>
<br>

<table>
<%
i = 0
While Not rs.EOF
if i mod 3 = 0 then
response.write "<tr>"
end if
%>
<td>
<table border="0" cellpadding="0" cellspacing="4" width="40%" bgcolor="#000000">
  <tr>
        <td rowspan="3" width="25%">
        <A HREF="java script:displayWindow('showimg.asp?id=<%=RS("ID")%>',<%=RS("Width")%>,<%=RS("Height")%>)">
        <img src="images/<%=RS("Images")%>.<%=RS("Filtype")%>" height=100 width=70 border=0></a></td>
        <td width="75%"><font size="1" face="Tahoma">Filtype: <strong><%= RS("Filtype")%></strong></font></td>
    </tr>
    <tr>
        <td width="75%"><font size="1" face="Tahoma">Højde: <strong><%= RS("Height")%></strong>px Bredde: <strong><%= RS("Width")%></strong>px</font></td>
    </tr>
    <tr>
        <td width="75%"><font color="#FFFFFF" size="1" face="Tahoma">Billed: <strong><%= RS("Description")%></strong> </font></td>
    </tr>
</table>
</td>
<%
i = i+1
if i mod 3 = 0 then
response.write "</tr>"
end if
RS.MoveNext
wend
Conn.Close
Set Conn = Nothing
%>

<font size="1" face="Verdana">
</body>
</html>


Sådan her burde den være der...
Avatar billede webbygger Nybegynder
14. november 2003 - 19:47 #9
YES !

Jeg syntes DU fortjener nogle flere point...men hvordan er det nu jeg gør det ellebaek ?
Avatar billede webbygger Nybegynder
14. november 2003 - 19:56 #10
Værsgo' Og tak for hjælpen
Avatar billede webbygger Nybegynder
14. november 2003 - 20:51 #11
I kan se der færdig resultat under designgalleri http://www.web-byggeren.dk/
Avatar billede ellebaek Nybegynder
15. november 2003 - 12:14 #12
Takker for points..

..Ellebæk!
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Kurser inden for grundlæggende programmering

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester