Results 1 to 2 of 2

Thread: Carousel II new window

  1. #1
    Join Date
    Jul 2008
    Posts
    24
    Thanks
    9
    Thanked 0 Times in 0 Posts

    Question Carousel II new window

    Quote Originally Posted by jscheuer1 View Post
    For a simple installation, install the Lightbox 2.03a scripts and styles in the head of the page as instructed on the Lightbox 2.03a demo page. And install the Carousel script according to it's instructions on its demo page.

    Then of course, for the Carousel array, use your image/larger image pairs, ex:

    Code:
    	Car_Image_Sources=new Array(
    		"photo1.jpg","photo1_lrg.jpg",
    		"photo2.jpg","photo2_lrg.jpg",
    		"photo3.jpg","photo3_lrg.jpg",
    		"photo4.jpg","photo4_lrg.jpg" // NOTE No comma after last line
    		);
    Replace this code in the Carousel script (at the end):

    Code:
    	function C_LdLnk(){if(this.lnk)window.location.href=this.lnk}
    	function C_Stp(){this.style.cursor=this.lnk?"pointer":"default";C_Stppd=true;}
    	function C_Rstrt(){C_Stppd=false}
    with this code:

    Code:
    	function C_LdLnk(){if(this.lnk && !Carousel.lnks[this.lnk]){
    		Carousel.lnks[this.lnk] = document.createElement('a');
    		Carousel.lnks[this.lnk].href = this.lnk;
    		Carousel.lnks[this.lnk].rel = 'lightbox';
    		} if(this.lnk) myLightbox.start(Carousel.lnks[this.lnk]);}
    	function C_Stp(){this.style.cursor=this.lnk?"pointer":"default";C_Stppd=true;}
    	function C_Rstrt(){C_Stppd=false}
    	Carousel.lnks = {};
    Hi, I'm very new here, but the carousel script is great, just how do I modify the array so that a url opens in either new window like
    <script type="text/javascript">
    <!--
    function opencontactWin(){
    winTech=window.open('contact-form.htm','contact','height=600,width=550,toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=), scrollbars=0')
    }
    // --></script>

    or even just a new smaller window, if possible with all menus and a fixed size.

    Last edited by jscheuer1; 02-05-2009 at 04:02 PM. Reason: moved from another thread

  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

    From the demo page, Step 2, third Carousel:

    Code:
              lnk_targets:['photo', //link target for each link (see: http://www.codingforums.com/showthread.php?t=58814&page=2)
                           'photo',
                           '_blank',
                           '_top.steve' ],
              lnk_attr:['width=700,height=600,top=200,menubar=yes', //window attribute for each pop up (see url above for docs)
                        'width=700,height=600,left=400,scrollbars=yes',
                        'width=750,height=550,left=300,top=100',
                        ''],
    So basically you set the target to a unique window name (not to a frame or iframe name), or to _blank, and then set the corresponding attr properties (specifications) for that window.
    - 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
  •