Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jun 2007
    Thanked 0 Times in 0 Posts

    Photo Gallery - Locking the size

    I have an online gallery and right now I have the code set up to open the photo in a new window, what I want to do is lock that size at 600x399...how do I do that? Here is the code for one page.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Waterfall Gallery</title>

    <link rel="stylesheet" href="gallerystyle2.css" />

    <script type="text/javascript" src="motiongallery2.js">

    * CMotion Image Gallery II- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
    * Visit http://www.dynamicDrive.com for source code
    * Modified by jscheuer1 for vertical orientation, at http://www.dynamicDrive.com/forums




    <div style="overflow:hidden;">
    <div id="motioncontainer" style="width:150px; height:350px; overflow:hidden; position: relative;">
    <div id="motiongallery" style="position:absolute; left:0; top:0;">

    <!--Gallery Contents below-->

    <a href="Waterfalls/SMlandscapes (144).jpg" target="_blank" ><img src="Waterfalls/SMlandscapes (144)_icon.jpg" border=1></a><br />
    <a href="Waterfalls/SMlandscapes1.jpg" target="_blank" ><img src="Waterfalls/SMlandscapes1_icon.jpg" border=1></a><br />
    <a href="Waterfalls/SMlandscapes2.jpg" target="_blank"><img src="Waterfalls/SMlandscapes2_icon.jpg" border=1></a><br />
    <a href="Waterfalls/SMlandscapes4.jpg" target="_blank"><img src="aterfalls/SMlandscapes4_icon.jpg" border=1></a><br />
    <a href="aterfalls/SMlandscapes6.jpg" target="_blank"><img src="Waterfalls/SMlandscapes6_icon.jpg" border=1></a><br />
    <a href="aterfalls/SMlandscapes8.jpg" target="_blank"><img src="dWaterfalls/SMlandscapes8_icon.jpg" border=1></a><br />
    <a href="Waterfalls/SMlanscapes3.jpg" target="_blank"><img src="Waterfalls/SMlanscapes3_icon.jpg" border=1></a><br />
    <a href="Waterfalls/SMpl15.jpg" target="_blank"><img src="Waterfalls/SMpl15_icon.jpg" border=1></a><br />
    <a href="Waterfalls/SMpl20.jpg" target="_blank"><img src="Waterfalls/SMpl20_icon.jpg" border=1></a><br />
    <a href="Waterfalls/SMpotters13.jpg" target="_blank"><img src="Waterfalls/SMpotters13_icon.jpg" border=1></a><br />
    <a href="Waterfalls/SMwatefall100.jpg" target="_blank"><img src="Waterfalls/SMwatefall100_icon.jpg" border=1></a><br />
    <a href="Waterfalls/SMwater16.jpg" target="_blank"><img src="Waterfalls/SMwater16_icon.jpg" border=1></a><br />
    <a href="aterfalls/SMwater17.jpg" target="_blank"><img src="Waterfalls/SMwater17_icon.jpg" border=1></a><br />
    <a href="Waterfalls/SMwater18.jpg" target="_blank"><img src="Waterfalls/SMwater18_icon.jpg" border=1></a><br />
    <a href="Waterfalls/SMwater19.jpg" target="_blank"><img src="Waterfalls/SMwater19_icon.jpg" border=1></a><br />
    <a href="Waterfalls/SMwater21.jpg" target="_blank"><img src="aterfalls/SMwater21_icon.jpg" border=1></a><br />
    <a href="Waterfalls/SMwater23.jpg" target="_blank"><img src="Waterfalls/SMwater23_icon.jpg" border=1></a><br />
    <a href="Waterfalls/SMwater5.jpg" target="_blank"><img src="Waterfalls/SMwater5_icon.jpg" border=1></a><br />
    <a href="Waterfalls/SMwater9.jpg" target="_blank"><img src="Waterfalls/SMwater9_icon.jpg" border=1></a><br />
    <a href="Waterfalls/SMwaterfall101.jpg" target="_blank"><img src="Waterfalls/SMwaterfall101_icon.jpg" border=1></a><br />

    <!--End Gallery Contents-->



  • #2
    Senior Coder koyama's Avatar
    Join Date
    Dec 2006
    Copenhagen, Denmark
    Thanked 5 Times in 5 Posts
    Quote Originally Posted by kdenkers View Post
    I have an online gallery and right now I have the code set up to open the photo in a new window, what I want to do is lock that size at 600x399...how do I do that?
    This may actually be a JavaScript question. If I understand you question correctly, then try this as a start:
    <a href="Waterfalls/SMlandscapes1.jpg" target="_blank" 
    onclick="window.open('Waterfalls/SMlandscapes1.jpg','','width=600,height=399');return false;">
    <img src="Waterfalls/SMlandscapes1_icon.jpg" border=1></a>


    Posting Permissions

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