...

View Full Version : Photo Slider II



fingertips
12-22-2006, 12:20 AM
How can I have it keep the photos in their original proportions. All photos are under 640 x 480 though not all the same size. When they are viewed in the slider the are streteched to the 640 x 480 regardless of their original size.

_Aerospace_Eng_
12-22-2006, 05:31 AM
And we are supposed to know what the code for the script looks like how? You haven't posted a link or anything.

fingertips
12-27-2006, 09:40 PM
Sorry my fault, here is code to Photo Slider II. I need to be able to input more then one line of text in the box that appears below each slide

<script language="JavaScript1.1">

/*
Photo Slider II- By Kevin Adams (kadams70@hotmail.com)
For this script and more
Visit http://www.javascriptkit.com
*/

var photos=new Array()
var text=new Array()
var which=0
var what=0

//Change the below variables to reference your own images. You may have as many images in the slider as you wish
photos[0]="galleries/landscape_and_animals/A Bog in Sandwich, NH.jpg"
photos[1]="galleries/landscape_and_animals/Blue Grass.jpg"
photos[2]="galleries/landscape_and_animals/Cat at Dusk.jpg"
photos[3]="galleries/landscape_and_animals/Chicken.jpg"
photos[4]="galleries/landscape_and_animals/Granby Bog.jpg"
photos[5]="galleries/landscape_and_animals/Ocean Wave.jpg"
photos[6]="galleries/landscape_and_animals/R.I. Beach.jpg"
photos[7]="galleries/landscape_and_animals/Seagull.jpg"
photos[8]="galleries/landscape_and_animals/Spider Web.jpg"
photos[9]="galleries/landscape_and_animals/Stream at Mcleans Conservation, Granby, CT.jpg"
photos[10]="galleries/landscape_and_animals/Sunset with Ocean Grass, R.I..jpg"
photos[11]="galleries/landscape_and_animals/Tide Pool.jpg"
photos[12]="galleries/landscape_and_animals/White Heron.jpg"

//change coresponding description
text[0]="Amaryllis"
text[1]="Cacrus Flower!"
text[2]="Cactus Flower"
text[3]="Cymbidium Orchid."
text[4]="Daffadil!"
text[5]="Easter Lilly"
text[6]="Iris B."


function backward(){
if (which>0){
window.status=''
which--
document.images.photoslider.src=photos[which];
what--
document.rotater.description.value=text[what];
}
}

function forward(){
if (which<photos.length-1){
which++
document.images.photoslider.src=photos[which]
what++
document.rotater.description.value=text[what];
}
else window.status='End of gallery'
}

function type()
{
alert("This textbox will only display default comments")
}


</script>
<p><input type=text name="description" style="width:400px" size=50>

<p><input type="button" value="<<Back" name="B2"
onClick="backward()"> <input type="button" value="Next>>" name="B1"
onClick="forward()"><br>
<a href="#" onClick="which=1;what=1;backward();return false"><small>Start Over</small></a></p>
</center></div>
</form>
</td>
</tr>
</table>

<table border="0" cellpadding="0" cellspacing="0" width="800">
<tr>
<td>&nbsp;</td>
</tr>
</table>
</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="800" height="53">
<tr>
<td>&nbsp;</td>
</tr>
</table>
</div>
</td>
</tr>
</table>

<script language=JavaScript>
<!--

//Disable right mouse click Script
//By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive
//For full source code, visit http://www.dynamicdrive.com

var message="VA Copyrighted Please contact Nancy Griswold for Artwork!";

///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("alert(message);return false")

// -->
</script>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum