I have hit a wall in a script I'm building for a web site. I'm attempting to use a recordset in a javascript "Preload Images" script. Here's the code I'm using:
<body onLoad="MM_preloadImages(
<%
While ((Repeat2__numRows <> 0) AND (NOT rsProdFinishPicsPreload.EOF))
%>
'<%=(rsProdFinishPicsPreload.Fields.Item("attrdtPic"
.Value)%>'
<%
If (rsProdFinishPicsPreload_last) Then%> <% Else %>,<% End If
%>
<%
Repeat2__index=Repeat2__index+1
Repeat2__numRows=Repeat2__numRows-1
rsProdFinishPicsPreload.MoveNext()
Wend
%>
)">
This is what is being returned from the server:
<body onLoad="MM_preloadImages('Assets/PdFantasy/Rose FairyR.jpg','Assets/PdFantasy/Rose FairyP.jpg',)">
The last "," is not suppose to be there. As you can see in the code above I tried eliminating the "," with this:
<%
If (rsProdFinishPicsPreload_last) Then%> <% Else %>,<% End If %>
I'm sure the fix is simple but I've been banging away at this for so long that my mind is numb.
I would greatly appreciate any help on this one.
<body onLoad="MM_preloadImages(
<%
While ((Repeat2__numRows <> 0) AND (NOT rsProdFinishPicsPreload.EOF))
%>
'<%=(rsProdFinishPicsPreload.Fields.Item("attrdtPic"
<%
If (rsProdFinishPicsPreload_last) Then%> <% Else %>,<% End If
%>
<%
Repeat2__index=Repeat2__index+1
Repeat2__numRows=Repeat2__numRows-1
rsProdFinishPicsPreload.MoveNext()
Wend
%>
)">
This is what is being returned from the server:
<body onLoad="MM_preloadImages('Assets/PdFantasy/Rose FairyR.jpg','Assets/PdFantasy/Rose FairyP.jpg',)">
The last "," is not suppose to be there. As you can see in the code above I tried eliminating the "," with this:
<%
If (rsProdFinishPicsPreload_last) Then%> <% Else %>,<% End If %>
I'm sure the fix is simple but I've been banging away at this for so long that my mind is numb.
I would greatly appreciate any help on this one.