Dynamic Slide Show
Can I create a slideshow with images pulled from a database?
Answer:
It is a little tricky, but you can create a dynamic slideshow.
1. Create a recordset on your .asp page.
1. From the Bindings panel, choose Recordset and name it.
I named my recordset rsAdres.2. Select the datasource connection.
3. In the dropdown select the Table.
4. In Columns select the field that holds the image file names. Select only that field.
5. Click OK.
6. Press CTRL-S to save your file.
2. Create a link to the popup window.
Insert text or an image that can be clicked to open the popup window.
Open the Advanced Open Window 3 panel by opening the behaviors panel and selecting Advanced Open Window 3 from the dropdown menu under the + sign.
3. Here comes the magic
Insert this code into URL to Display: <%=rsUploads.getString(,,,"|")%>
4. But what if your images are in a folder!
In my case the folder name is photos.
Then it will look like this: photos/<%=rsUploads.getString(,,,"|photos/")%>
5. Save your page and click f12 to test!
6. Pretty cool, right?!
NOTE: The Advanced Open Window 3 behavior will not be editable after you apply this special url So you might want to do this as last action!
Comments
Number before name of image
I am trying to pull dynamic images using the method above except my recordset has a "where" clause. I cannot view the images because it automatically inserts a number before the image name. e.g. babyphoto.jpg becomes 4babyphoto.jpg. I am just using the WYSIWYG tools.
Do you have any solution to this?
RE: Number before name of image
What is rsUploads referring to?
The querystring you mention is rsUploads. Should it be the same as the recordset you create for the images?
RE: What is rsUploads referring to?
You must me logged in to write a comment.