This is the vbscript that populates arrPageData.
<%
dim oRS, arrPageData, intArrLen1, intArrLen2
select case session("sesPageName")
case "restorationPage"
strSql = "qryAllRestorationData"
case "retouchingPage"
strSql = "qryAllRetouchingData"
case "collagePage"
strSql = "qryAllCollageData"
case "galleryDigitalMenuPage"
strSql = "qryAllDigitalGalleryData"
case "galleryPhotoMenuPage"
strSql = "qryAllPhotoGalleryData"
end select
Set oRS = Server.CreateObject("ADODB.Recordset")
oRS.Open strSql, "dsnCJMGData", adOpenStatic, adLockOptimistic
arrPageData = oRS.GetRows
intArrLen = ubound(arrPageData,2)
oRs.Close
Set oRs = Nothing
%>
This is the page code.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%
session("sesPageName") = "collagePage"
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name=vs_defaultClientScript content="JavaScript">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="GENERATOR" content="Microsoft FrontPage 6.0" />
<meta name="ProgId" content="FrontPage.Editor.Document" />
<link rel="stylesheet" type="text/css" href="CJMGraphicsPublic.css" />
<title>CJM Graphics Collage Page</title>
<script language="javascript">
<!--
var arrCollageImg = new Array();
<%
--------------------------------------------------
----The error says syntex error at this point ----
--------------------------------------------------
For i = 0 To UBound(arrCollageData,0)
For j = 0 to UBound(arrCollageData,1)
Response.Write "arrCollageImg[" & i & "][" & j & "] = """ & Replace(arrCollageData, """", "\""") & """;"
Next
Next
%>
//-->
</script>
</head>
<body>
<script type="text/javascript">
for(var i=0;i<arrCollageImg.length - 1; i++){
document.write("<div>");
document.write("<img src='images/collage/" + arrCollageImg[4][i] + "'")
document.write("/<div>");
}
</script>
</body>
</html>
</html>
Terry Migliorino
[email protected]