PDA

View Full Version : swiss army script dynamic images from DB



esk1mox
09-21-2007, 03:20 PM
Hello,

I am trying to have a dynamic list of images using ASP inside the swiss army code. I tried this but slides3[] is not taking the values of variable i.

ANY HINT?? THANKS...

<script language="Javascript">
<!--
<% for i = 0 to 2 %>
slides3[<%= i %>] = ["images/jordan2_s.jpg", "", "/images/jordan2.jpg"];
<% next %>
//-->
</script>

http://www.dynamicdrive.com/dynamicindex14/swissarmy/index.htm

jscheuer1
09-21-2007, 03:31 PM
That looks like (if it works at all) it would make an array like so:


slides3[0] = ["images/jordan2_s.jpg", "", "/images/jordan2.jpg"];
slides3[1] = ["images/jordan2_s.jpg", "", "/images/jordan2.jpg"];
slides3[2] = ["images/jordan2_s.jpg", "", "/images/jordan2.jpg"];


In any case, I'm not all that familiar with asp. To debug something like that, try it out. If there are no server errors reported, it would become just a matter of tweaking the asp code until the generated source (as seen in the browser's view source) depicts an array suitable for the script.