Forums
This topic is locked
Dynamic XML for Slideshow extension
Posted 10 Apr 2007 18:54:20
1
has voted
10 Apr 2007 18:54:20 Hans Konings posted:
Hi,I am trying to get the Active Slide Show extension to work dynamically with pictures from my access database. From a result page, where a number of items are shown it is possible to go to a detailed page by clicking on a thumbnail. On this deailed page i want my slideshow to apear.
The code for my Slideshow_xml.asp page is:
<%@LANGUAGE="JAVASCRIPT"%>
<!--#include file="Connections/slideshow.asp" -->
<%
var RSdetails__MMColParam = "%";
if (String(Request.Querystring("Referentienr") != "undefined" &&
String(Request.Querystring("Referentienr") != "" {
RSdetails__MMColParam = String(Request.Querystring("Referentienr");
}
%>
<%
var RSdetails = Server.CreateObject("ADODB.Recordset"
RSdetails.ActiveConnection = MM_slideshow_STRING;
RSdetails.Source = "SELECT * FROM Occasions WHERE Referentienr = '"+ RSdetails__MMColParam.replace(/'/g, "''" + "'";
RSdetails.CursorType = 0;
RSdetails.CursorLocation = 2;
RSdetails.LockType = 1;
RSdetails.Open();
var RSdetails_numRows = 0;
%>
<?xml version="1.0" encoding="UTF-8"?>
<slideshow effecttime="5" transtime="2" music="" volume="50" repeat="true" streaming="true" loopslideshow="true" onclick="" onclicktarget="_self" doafter="" doaftertarget="_self">
<slide filename="./uploads/<%=(RSdetails.Fields.Item("Image".Value)%>" />
<slide filename="./uploads/<%=(RSdetails.Fields.Item("Image 1".Value)%>" />
<slide filename="./uploads/<%=(RSdetails.Fields.Item("Image 2".Value)%>" />
<slide filename="./uploads/<%=(RSdetails.Fields.Item("Image 3".Value)%>" />
<slide filename="./uploads/<%=(RSdetails.Fields.Item("Image 4".Value)%>" />
</slideshow>
<%
RSdetails.Close();
%>
If i put in a fixed value for var RSdetails__MMColParam = "9903456"; which is a reference number in my database the correct pictures are show but the var RSdetails__MMColParam = "%"; does not pick up the reference number as i would expect.
Any suggestions how to fix this issue?
Thanks,
Hans