Results 1 to 2 of 2

Thread: swiss army script dynamic images from DB

  1. #1
    Join Date
    Sep 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default swiss army script dynamic images from DB

    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/dynamici...army/index.htm

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    That looks like (if it works at all) it would make an array like so:

    Code:
    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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •