Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2
  1. #1
    Senior Member
    Join Date
    Feb 2011
    Location
    England
    Posts
    103
    Member #
    26718
    Liked
    3 times
    [COLOR=rgb(0, 0, 0)]Hi. Got a strange one to puzzle on.
    I have embedded the Step Carousel jscript in a web page [COLOR=rgb(0, 0, 0)]http://www.17minutes.f2s.com/Gallery.htm[/COLOR]
    I have scaled the images so that they fit the panel. However, I would like to be able to print out a larger sized version of the image being viewed. This would be stored in a subfolder of the main image folder so that the scaled and full size images are kept separate. The printing would be through a function, "BigPic", which creates a new page, has it's source as the larger image, prints the page and then closes it leaving the normal carousel view.
    I have not been able to create a button in each panel so i thought a "print" button at the bottom of the page would work. But how to pass parameters from each panel to the function when called?

    Here is the code I have so far:
    [/COLOR]
    [COLOR=rgb(0, 0, 0)]
    Code:
    <html>
    <head>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
    
    <script type="text/javascript" src="stepcarousel.js">
    
    /***********************************************
    * Step Carousel Viewer script- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
    * Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
    * This notice must stay intact for legal use
    ***********************************************/
    
    </script>
    <SCRIPT LANGUAGE="JavaScript">
    
    function BigPic(name,source,width,height){
     var source
     var newWindow = window.open("", "",
            "location=no, directories=no, fullscreen=no, menubar=no, status=no, toolbar=no, width=1600, height=1200 ", scrollbars=no");
        newWindow.document.write("<html><head><title>BigPic</title></head>");
        newWindow.document.write("<BODY BGCOLOR=#000000 LINK=#FFFFFF>");
        newWindow.document.write("<center>");
        newWindow.document.write("<a = 'javascript:window.refresh()'></a>")
        newWindow.document.write("<img src='" + source + "'/><br>");
        newWindow.document.write("</body></html>");
        newWindow.document.print();
        newWindow.document.close();
    }
    
    </SCRIPT>
    <style type="text/css">
    
    .stepcarousel{
    position: relative; /*leave this value alone*/
    border: 10px solid black;
    overflow: scroll; /*leave this value alone*/
    width: 920px; /*Width of Carousel Viewer itself*/
    height: 700px; /*Height should enough to fit largest content's height*/
    margin-left: auto;
    margin-right: auto;
    }
    
    .stepcarousel .belt{
    position: absolute; /*leave this value alone*/
    left: 0;
    top: 0;
    }
    
    .stepcarousel .panel{
    float: left; /*leave this value alone*/
    overflow: hidden; /*clip content that go outside dimensions of holding panel DIV*/
    margin: 10px; /*margin around each panel*/
    width: 920px; /*Width of each panel holding each content. If removed, widths should be individually defined on each content DIV then. */
    }
    
    </style>
    
    <script type="text/javascript">
    
    stepcarousel.setup({
    galleryid: 'mygallery', //id of carousel DIV
    beltclass: 'belt', //class of inner "belt" DIV containing all the panel DIVs
    panelclass: 'panel', //class of panel DIVs each holding content
    autostep: {enable:false, moveby:1, pause:3000},
    panelbehavior: {speed:500, wraparound:false, wrapbehavior:'slide', persist:false},
    defaultbuttons: {enable: true, moveby: 1, leftnav: ['Images/Previous.png', 220, 650], rightnav: ['Images/Next.png', -300,650]},
    statusvars: ['statusA', 'statusB', 'statusC'], //register 3 variables that contain current panel (start), current panel (last), and total panels
    contenttype: ['inline'] //content setting ['inline'] or ['ajax', 'path_to_external_file']
    })
    
    </script>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Flash Gallery</title>
    <style type="text/css">
    <!--
    body,td,th {
        color: #FFFFFF;
    }
    body {
        background-color: #000000;
    }
    a:link {
        color: #FFFFFF;
        text-decoration: none;
    }
    a:visited {
        text-decoration: none;
        color: #FFFFFF;
    }
    a:hover {
        text-decoration: none;
    }
    a:active {
        text-decoration: none;
    }
    .style1 {font-size: 36px}
    -->
    </style>
    
    </head>
    
    <body>
    <div id="mygallery" class="stepcarousel" >
    <div class="belt">
    <div class="panel">
      <div align="center"><img src="Samurai/001.jpg" />
      </div>
    </div>
    
    <div class="panel">
        <div align="center"><img src="Samurai/002.jpg" />
        </div>
    </div>
    
    <div class="panel">
        <div align="center"><img src="Samurai/003.jpg" />
        </div>
    </div>
    
    <div class="panel">
        <div align="center"><img src="Samurai/004.jpg" />
        </div>
    </div>
    
    <div class="panel">
        <div align="center"><img src="Samurai/005.jpg" />
        </div>
    </div>
    
    </div>
    </div>
       
    </body>
    
    </html>
    [/COLOR]

    [COLOR=rgb(0, 0, 0)]Thanks, Lol[/COLOR]

  2.  

  3. #2
    Senior Member
    Join Date
    Feb 2011
    Location
    England
    Posts
    103
    Member #
    26718
    Liked
    3 times
    Ignore this folks, I'm going to use a different script.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 05:19 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com