Results 1 to 4 of 4

Thread: Two Swiss Army Slideshows in one .aspx page

  1. #1
    Join Date
    Jul 2012
    Posts
    3
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default Two Swiss Army Slideshows in one .aspx page

    Hello,
    I’m trying to design two slideshows in one .aspx page. In HTML it’s easy just by writing codes in Head and Body parts. My problem is how to define the head part with ASP coding. How to have these codes :
    Code:
    <script type="text/javascript">
        var preload_ctrl_images = true;
        var previmg = 'left.gif';
        var stopimg = 'stop.gif';
        var playimg = 'play.gif';
        var nextimg = 'right.gif';
        var slides = [];
        slides[0] = ["Images/Slides/A.jpg", "A"];
        slides[1] = ["Images/Slides/B.jpg", "B"];
        slides[2] = ["Images/Slides/C.jpg", "C"];
        var slides2 = [];
        slides2[0] = ["Images/Ads/D.jpg", "D"];
        slides2[1] = ["Images/Ads/E.jpg", "E"];
        slides2[2] = ["Images/Ads/F.jpg", "F"];
     </script>
    <script src="swissarmy.js" type="text/javascript">
    </script>
    
    On top of the 
    <asp:content ……>
    .
    .
    .
    Appreciated your reply in advance
    Last edited by jscheuer1; 07-08-2012 at 01:01 AM. Reason: Format

  2. #2
    Join Date
    Apr 2012
    Location
    Chester, Cheshire
    Posts
    329
    Thanks
    7
    Thanked 35 Times in 35 Posts

    Default

    Are you using Master Pages? Which Framework are you using? Are you using a ScriptManager for AJAX calls?

  3. The Following User Says Thank You to ApacheTech For This Useful Post:

    mmfarmani (07-08-2012)

  4. #3
    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

    .
    Please post about Dynamic Drive Scripts in the Dynamic Drive Scripts Help section here where I've moved this thread, and:

    Warning: Please include a link to the DD script(s) in question in your post. See this post for more information.


    I assume you mean:

    http://www.dynamicdrive.com/dynamici...army/index.htm

    If so, what you have there so far looks OK. You don't have the property for image buttons for either slideshow, so it should be:

    Code:
    <script type="text/javascript">
        var preload_ctrl_images = false;
        var slides = [];
        slides[0] = ["Images/Slides/A.jpg", "A"];
        slides[1] = ["Images/Slides/B.jpg", "B"];
        slides[2] = ["Images/Slides/C.jpg", "C"];
        var slides2 = [];
        slides2[0] = ["Images/Ads/D.jpg", "D"];
        slides2[1] = ["Images/Ads/E.jpg", "E"];
        slides2[2] = ["Images/Ads/F.jpg", "F"];
     </script>
    <script src="swissarmy.js" type="text/javascript">
    </script>
    
    On top of the 
    <asp:content ……>
    .
    .
    .
    As long as the swissarmy.js script is in the same folder as the page with the above code, and the images are where the code designates, all you need in the body of the page is:

    Code:
    <script type="text/javascript">
    new inter_slide(slides)
    </script>
    and:

    Code:
    <script type="text/javascript">
    new inter_slide(slides2)
    </script>
    The first one will present a slideshow of the slides array. The second will present a slideshow of the slides2 array.

    These in body scripts should be placed in the body where you want each slideshow to show up.

    If you want more help, please include a link to the page on your site that contains the problematic code so we can check it out.
    - John
    ________________________

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

  5. The Following User Says Thank You to jscheuer1 For This Useful Post:

    mmfarmani (07-08-2012)

  6. #4
    Join Date
    Jul 2012
    Posts
    3
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    I got it solved. I appreciate your help.....

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
  •