/ Forside/ Teknologi / Udvikling / ASP / Spørgsmål
Login
Glemt dit kodeord?
Brugernavn 

Kodeord  


Reklame
Top 10 brugere
ASP
#NavnPoint
smorch 9259
Harlekin 1866
molokyle 1040
Steffanst.. 758
gandalf 657
smilly 564
gibson 560
cumano 530
MouseKeep.. 480
10  Random 410
hmm håber i kan se fejlen
Fra : hubi
Vist : 557 gange
250 point
Dato : 16-03-08 18:57

hey jeg er gået lidt i stå og kan bare ikke se hvorfor det script ikke gider vise billederne, nogle der kan hjælpe

scriptet er en viderebygning af http://vikjavev.no/highslide/download.php (free)

Kode
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "xhtml11.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Highslide JS</title>

<!--
1 ) Reference to the file containing the javascript.
This file must be located on your server.
-->

<script type="text/javascript" src="highslide/highslide.js"></script>


<!--
2) Optionally override the settings defined at the top
of the highslide.js file. The parameter hs.graphicsDir is important!
-->

<script type="text/javascript">
hs.graphicsDir = 'highslide/graphics/';
</script>


<!--
3) These CSS-styles are necessary for the script to work. You may also put
them in an external CSS-file. See the webpage for documentation.
-->

<style type="text/css">
* {
font-family: Verdana, Helvetica;
font-size: 10pt;
}
.highslide {
   cursor: url(highslide/graphics/zoomin.cur), pointer;
outline: none;
}
.highslide-active-anchor img {
   visibility: hidden;
}
.highslide img {
   border: 2px solid gray;
}
.highslide:hover img {
   border: 2px solid white;
}
.highslide-wrapper {
   background: white;
}
.highslide-image {
   border: 10px solid white;
}
.highslide-image-blur {
}
.highslide-caption {
display: none;
border: 5px solid white;
border-top: none;
padding: 5px;
background-color: white;
}
.highslide-loading {
display: block;
   color: black;
   font-size: 8pt;
   font-family: sans-serif;
   font-weight: bold;
text-decoration: none;
   padding: 2px;
   border: 1px solid black;
background-color: white;

padding-left: 22px;
background-image: url(highslide/graphics/loader.white.gif);
background-repeat: no-repeat;
background-position: 3px 1px;
}
a.highslide-credits,
a.highslide-credits i {
padding: 2px;
color: silver;
text-decoration: none;
   font-size: 10px;
}
a.highslide-credits:hover,
a.highslide-credits:hover i {
color: white;
background-color: gray;
}

a.highslide-full-expand {
   background: url(highslide/graphics/fullexpand.gif) no-repeat;
   display: block;
   margin: 0 10px 10px 0;
   width: 34px;
   height: 34px;
}

/* These must always be last */
.highslide-display-block {
display: block;
}
.highslide-display-none {
display: none;
}
</style>

</head>

<body style="background-color: silver">
<div>
<!--
4) This is how you mark up the thumbnail image with an anchor tag around it.
The anchor's href attribute defines the URL of the full-size image.
-->
<%
ImageDir = "/images/" ' Mappen med filerne
Set objFS = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFS.GetFolder(Server.MapPath(ImageDir))
Set objFiles = objFolder.Files

intPage = Request.Querystring("page")
If isNumeric(intPage) = False Or intPage < 1 Then
intPage = 1
End If

intPageSize = 3 ' Antal filer på hver side
intImgCount = objFiles.Count
intPageCount = -Int(-(intImgCount/intPageSize))

Response.Write "<p><strong>" & intImgCount & " Billeder - "
Response.Write "viser side " & intPage & " af " & intPageCount & ":</strong></p>"

For Each Image In objFiles
intFile = intFile +1
If (intFile >= ((intPage-1)*intPageSize)+1) And (intFile =< (intPageSize*intPage)) Then
Response.Write "<p><a href=""" & ImageDir & Image.Name & " class=""highslide"" onclick=""return hs.expand(this);"" /></a></p>"
End If
Next

strScriptName = Request.Servervariables("ScriptName")
Response.Write "<p>Gå til side "
For i = 1 To intPageCount
Response.Write "<a href=" & strScriptName & "?page=" & i & ">" & i & "</a> "   
Next
Response.Write "</p>"
Set objFS = Nothing
%>

<!--
5 (optional). This is how you mark up the caption. The caption must be directly after the anchor above..
-->

<div class="highslide-caption">
This caption can be styled using CSS.
</div>
   
</div>
</body>
</html>


håber i kan hjælpe

//jesper

 
 
Kommentar
Fra : smorch


Dato : 16-03-08 19:05

Kommer der nogen for for fejlmeddelse?

Kommentar
Fra : strarupski


Dato : 16-03-08 19:11

hejsa,

øh... det føles som over 100 år siden jeg sidst arbejdede ASP... havde det bare været melscript istedet for...

øh... har du defineret hvor dine billeder er? (mappen med billeder)
Kode
Set objFolder = objFS.GetFolder(Server.MapPath(ImageDir))


mvh.

Strarup


Kommentar
Fra : hubi


Dato : 16-03-08 19:17

nej der kommer ingen fejlmeddelse... den viser bare siden uden billeder

hehe desværre...

ja det skulle jeg meget gerne i

Kode
<%
ImageDir = "/images/" ' Mappen med filerne
Set objFS = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFS.GetFolder(Server.MapPath(ImageDir))
Set objFiles = objFolder.Files


Accepteret svar
Fra : smorch

Modtaget 250 point
Dato : 17-03-08 08:56

Prøv nedenstående - det fungerer hos mig.

Kode
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "xhtml11.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Highslide JS</title>
<!--
1 ) Reference to the file containing the javascript.
This file must be located on your server.
-->
<script type="text/javascript" src="highslide/highslide.js"></script>


<!--
2) Optionally override the settings defined at the top
of the highslide.js file. The parameter hs.graphicsDir is important!
-->

<script type="text/javascript">
hs.graphicsDir = 'highslide/graphics/';
</script>
<!--
3) These CSS-styles are necessary for the script to work. You may also put
them in an external CSS-file. See the webpage for documentation.
-->
<style type="text/css">
* {
   font-family: Verdana, Helvetica;
   font-size: 10pt;
}
.highslide {
   cursor: url(highslide/graphics/zoomin.cur), pointer;
   outline: none;
}
.highslide-active-anchor img {
   visibility: hidden;
}
.highslide img {
   border: 2px solid gray;
}
.highslide:hover img {
   border: 2px solid white;
}
.highslide-wrapper {
   background: white;
}
.highslide-image {
   border: 10px solid white;
}
.highslide-image-blur {
}
.highslide-caption {
   display: none;
   border: 5px solid white;
   border-top: none;
   padding: 5px;
   background-color: white;
}
.highslide-loading {
   display: block;
   color: black;
   font-size: 8pt;
   font-family: sans-serif;
   font-weight: bold;
   text-decoration: none;
   padding: 2px;
   border: 1px solid black;
   background-color: white;
   padding-left: 22px;
   background-image: url(highslide/graphics/loader.white.gif);
   background-repeat: no-repeat;
   background-position: 3px 1px;
}
a.highslide-credits, a.highslide-credits i {
   padding: 2px;
   color: silver;
   text-decoration: none;
   font-size: 10px;
}
a.highslide-credits:hover, a.highslide-credits:hover i {
   color: white;
   background-color: gray;
}
a.highslide-full-expand {
   background: url(highslide/graphics/fullexpand.gif) no-repeat;
   display: block;
   margin: 0 10px 10px 0;
   width: 34px;
   height: 34px;
}
/* These must always be last */
.highslide-display-block {
   display: block;
}
.highslide-display-none {
   display: none;
}
</style>
</head>
<body style="background-color: silver">
<div>
<!--
4) This is how you mark up the thumbnail image with an anchor tag around it.
The anchor's href attribute defines the URL of the full-size image.
-->
<%
ImageDir = "/images/" ' Mappen med filerne
Set objFS = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFS.GetFolder(Server.MapPath(ImageDir))
Set objFiles = objFolder.Files

intPage = Request.Querystring("page")
If isNumeric(intPage) = False Or intPage < 1 Then
intPage = 1
End If

intPageSize = 10 ' Antal filer p hver side
intImgCount = objFiles.Count
intPageCount = -Int(-(intImgCount/intPageSize))

Response.Write "<p><strong>" & intImgCount & " Billeder - "
Response.Write "viser side " & intPage & " af " & intPageCount & ":</strong></p>"

For Each Image In objFiles
intFile = intFile +1
   If (intFile >= ((intPage-1)*intPageSize)+1) And (intFile =< (intPageSize*intPage)) Then
      if right(lcase(Image.Name),4)=".jpg" or right(lcase(Image.Name),4)=".gif" then
         'Response.Write "<img src='"& ImageDir & Image.Name & "' width='30' class='highslide' onclick='return hs.expand(this);'><p><a href='" & ImageDir & Image.Name & "' class='highslide' onclick='return hs.expand(this);' /></a></p>"
         'response.Write("<a id=" & chr(34) & "thumb3" & chr(34) & " href=" & chr(34) & ""& ImageDir & Image.Name & "" & chr(34) & " class=" & chr(34) & "highslide" & chr(34) & " onclick=" & chr(34) & "return hs.expand(this,{wrapperClassName : " & chr(34) & "highslide-white" & chr(34) & ", spaceForCaption: 30,outlineType: " & chr(34) & "rounded-white" & chr(34) & "})" & chr(34) & "><img style=" & chr(34) & "width:28px; height:21px" & chr(34) & " src=" & chr(34) & ""& ImageDir & Image.Name & "" & chr(34) & " alt=" & chr(34) & "Highslide JS" & chr(34) & " title=" & chr(34) & "Click to enlarge" & chr(34) & " /></a>")

%>
<a href="<%= ImageDir & Image.Name %>" class="highslide" onclick="return hs.expand(this)"> <img src="<%= ImageDir & Image.Name %>" alt="<%= Image.Name %>"
      title="Click to enlarge" width="107" /></a>
<!--
5 (optional). This is how you mark up the caption. The caption must be directly after the anchor above..
-->
<%
      End If
   End If
Next

strScriptName = Request.Servervariables("ScriptName")
Response.Write "<p>Gå til side "
For i = 1 To intPageCount
Response.Write "<a href=" & strScriptName & "?page=" & i & ">" & i & "</a> "
Next
Response.Write "</p>"
Set objFS = Nothing
%>
<div class="highslide-caption"> This caption can be styled using CSS. </div>
</div>
</body>
</html>


Kommentar
Fra : smorch


Dato : 17-03-08 10:14

Hov - fjern lige alt det her:

Kode
'Response.Write "<img src='"& ImageDir & Image.Name & "' width='30' class='highslide' onclick='return hs.expand(this);'><p><a href='" & ImageDir & Image.Name & "' class='highslide' onclick='return hs.expand(this);' /></a></p>"
'response.Write("<a id=" & chr(34) & "thumb3" & chr(34) & " href=" & chr(34) & ""& ImageDir & Image.Name & "" & chr(34) & " class=" & chr(34) & "highslide" & chr(34) & " onclick=" & chr(34) & "return hs.expand(this,{wrapperClassName : " & chr(34) & "highslide-white" & chr(34) & ", spaceForCaption: 30,outlineType: " & chr(34) & "rounded-white" & chr(34) & "})" & chr(34) & "><img style=" & chr(34) & "width:28px; height:21px" & chr(34) & " src=" & chr(34) & ""& ImageDir & Image.Name & "" & chr(34) & " alt=" & chr(34) & "Highslide JS" & chr(34) & " title=" & chr(34) & "Click to enlarge" & chr(34) & " /></a>")


Kommentar
Fra : smorch


Dato : 17-03-08 11:56

Og sørg for at ingen af dine filer i mappen hedder noget med æ,ø,å,Æ,Ø eller Å

Mvh

sMorch

Godkendelse af svar
Fra : hubi


Dato : 19-03-08 01:25

Tak for svaret smorch. igen fungerer dint svar... tillod mig lige at hæve pointene med 150

Kommentar
Fra : smorch


Dato : 19-03-08 08:50

Jeg takker og bukker

Du har følgende muligheder
Eftersom du ikke er logget ind i systemet, kan du ikke skrive et indlæg til dette spørgsmål.

Hvis du ikke allerede er registreret, kan du gratis blive medlem, ved at trykke på "Bliv medlem" ude i menuen.
Søg
Reklame
Statistik
Spørgsmål : 173462
Tips : 31650
Nyheder : 719565
Indlæg : 6382357
Brugere : 218248

Månedens bedste
Årets bedste
Sidste års bedste