lazyrunner50
Programmer
Ok, I think I've almost worked out all the problems with my webpage, but right now, I'm trying to implement a counter for a slideshow which will wait for 5 seconds and then move to the next image. Basically what I'm doing is querying my database, getting the image names, and putting them into an array. I then pass the array in a session variable along with a counter. I pause for 5 seconds, increment the counter, reload the page, and display the new image. I'm currently having problems with the pause part of it.
I've gotten this error:
I originally tried sleep, but that didn't work, so then I tried echo, only to get the same results..
Code:
Dim wsh
set wsh = Server.CreateObject("WScript.Shell")
If Session("imageCounter") <> "" Then
theImages=Session("theImages")
counter=Session("imageCounter")
Response.Write ("<table>")
response.write("<tr><td><img src='" & theImages(counter) & ".jpg'></td></tr>")
Response.Write ("</table>")
counter=counter+1
Session("imageCounter")=counter
wsh.echo "Started"
'wsh.Sleep 5000
'Response.Redirect("SlideShowPage2Backup.asp")
I've gotten this error:
Code:
Microsoft VBScript runtime error '800a01b6'
Object doesn't support this property or method: 'echo'
SlideShowPage2Backup.asp, line 25
I originally tried sleep, but that didn't work, so then I tried echo, only to get the same results..