/    Sign up×
Community /Pin to ProfileBookmark

pictures not showing up in slideshow

does anyone know why my pictures arent showing up in this slideshow?

[CODE]
<?xml version=”1.0″ encoding=”UTF-8″?>
<!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” xml:lang=”en” lang=”en”>
<head>
<title> Best Friend Pets – Dogs </title>
<link rel=”stylesheet” href=”main.css”type=”text/css”/>
<script language=”JAVASCRIPT” type=”text/javascript”>
<!–
var dogs = new Array(); //variable for slide image array
dogs[1] = new Image();
dogs[2] = new Image();
dogs[3] = new Image();
dogs[4] = new Image();
dogs[5] = new Image();
dogs[6] = new Image();
dogs[7] = new Image();
dogs[8] = new Image();
dogs[9] = new Image();
dogs[10] = new Image();

dogs[1].src = “imageslizzy5.JPG”;
dogs[2].src = “imagesjake2.JPG”;
dogs[3].src = “imagesbear3.JPG”;
dogs[4].src = “imagesgidget5.JPG”;
dogs[5].src = “imagesgeno2.jpg”;
dogs[6].src = “imagesmax.jpg”;
dogs[7].src = “imagesmolly3.jpg”;
dogs[8].src = “imagesremington.jpg”;
dogs[9].src = “imagesmindy.jpg”;
dogs[10].src = “imagescuddles1.jpg”;

var dogdescript = new Array();
dogdescript[1] = “This is Lizzy. Lizzy is a Shih-t-zu and she is 11 years old. Lizzy loves to sleep. She has a very interesting personality. She has had 3 strokes this month and she broke her right front leg and she is also partially blind.”; //descriptions(captions) of pictures goes in this section
dogdescript[2] = “This is Jake. Jake is a 10 year old Black Labrador. As you can see he likes it when you throw a tennis ball for him, he always has something in his mouth.”;
dogdescript[3] = “This is Bear. He is a 7 year old Pomeranian. “;
dogdescript[4] = “This is Gidget. She is a 7 year old Pomeranian.”;
dogdescript[5] = “This is Geno.”;
dogdescript[6] = “This is Max.”;
dogdescript[7] = “This is Molly.”;
dogdescript[8] = “This is Remington.”;
dogdescript[9] = “This is Mindy.”;
dogdescript[10] = “This is Cuddles.”;

var slidenum = 1;
var totalslides = dogs.length – 1;

function fcnShow(direction){
if (direction == “next”){
(slidenum == totalslides) ? slidenum = 1 : slidenum++;
}//else{
//(slidenum == 1) ? slidenum = totalslides : slidenum–;
//}//end else
if (document.images){
document.dog.src = dogs[slidenum].src;
document.frmslideshow.txtcaption.value = dogdescript[slidenum];
document.frmslideshow.txtcurrentslide.value = slidenum;
}//end if
}//end function
//–>
</script>
</head>
<body bgcolor=”#99CCFF”>
<table border=”0″ width = 95% cellpadding=”0″ cellspacing=”0″>
<tr>
<td colspan=”1″> <a href=”index.html”><img src=”imageslogo.png” height=”90″ width=”90″></a></td>
<td colspan=”1″><h1 align=”center”><font color=”#000099″> Best Friend Pets, Inc.</font> </h1></td>
</tr>
<tr>
<td width=”10%” valign=”top”><b>
<br />
<br />
<a href=”index.html”>Home</a>
<br />
<br />
<br />
<a href=”dogs.html”>Dogs</a>
<br />
<br />
<br />
<a href=”rabbits.html”>Rabbits</a>
<br />
<br />
<br />
<a href=”cats.html”>Cats</a>
<br />
<br />
<br />
<a href=”donkeys.html”>Donkeys</a>
<br />
<br />
<br />
<a href=”cows.html”>Cows</a>
<br />
<br />
<br />
</b>
</td>
<td width=”75%” valign=”top”>
<br />
<br />
<br />
<div align=”center”>
<a href=”#” onclick=”fcnShow(‘next’);”><img src=”imagesdoggraphic.bmp” name=”dog” width=”300″ height=”250″></a>

<form name=”frmslideshow”>

<p><textarea name=”txtcaption” rows=”2″ cols=”50″>These are some pictures of our dogs.</textarea>
<br />
<br />

Slide Number:
<input type=”TEXT” value=”1″ name=”txtcurrentslide” size=”1″>
</p>
</form>
</div>
</td>
</tr>
</table>
<center><a href=”index.html”>Home</a> <font color=”#000099″>|</font> <a href=”dogs.html”>Dogs</a></font> <font color=”#000099″>|</font> <a href=”rabbits.html”>Rabbits</a> <font color=”#000099″>|</font>
<a href=”cats.html”>Cats</a> <font color=”#000099″>|</font> <a href=”donkeys.html”>Donkeys</a> <font color=”#000099″>|</font> <a href=”cows.html”>Cows</a></center>
</body>
</html>[/CODE]

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@JonaMay 02.2005 — [font=Trebuchet MS]Backslashes are escape characters, meaning that JavaScript is probably thinking that this:[/font]

<i>
</i>dogs[1].src = "imageslizzy5.JPG";
dogs[2].src = "imagesjake2.JPG";
dogs[3].src = "imagesbear3.JPG";
dogs[4].src = "imagesgidget5.JPG";
dogs[5].src = "imagesgeno2.jpg";
dogs[6].src = "imagesmax.jpg";
dogs[7].src = "imagesmolly3.jpg";
dogs[8].src = "imagesremington.jpg";
dogs[9].src = "imagesmindy.jpg";
dogs[10].src = "imagescuddles1.jpg";


[font=trebuchet ms]is actually this:[/font]

<i>
</i>dogs[1].src = "imageslizzy5.JPG";
dogs[2].src = "imagesjake2.JPG";
dogs[3].src = "imagesbear3.JPG";
dogs[4].src = "imagesgidget5.JPG";
dogs[5].src = "imagesgeno2.jpg";
dogs[6].src = "imagesmax.jpg";
dogs[7].src = "imagesmolly3.jpg";
dogs[8].src = "imagesremington.jpg";
dogs[9].src = "imagesmindy.jpg";
dogs[10].src = "imagescuddles1.jpg";


[font=trebuchet ms]Obviously that&#8217;s not what you&#8217;re looking for. The solution is to escape the escape characters, thus returning the backslash you want. Have you tried the following?[/font]

<i>
</i>dogs[1].src = "images\lizzy5.JPG";
dogs[2].src = "images\jake2.JPG";
dogs[3].src = "images\bear3.JPG";
dogs[4].src = "images\gidget5.JPG";
dogs[5].src = "images\geno2.jpg";
dogs[6].src = "images\max.jpg";
dogs[7].src = "images\molly3.jpg";
dogs[8].src = "images\remington.jpg";
dogs[9].src = "images\mindy.jpg";
dogs[10].src = "images\cuddles1.jpg";
×

Success!

Help @blueandconfused spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.22,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...