PDA

View Full Version : swap images stopped working


lola
04-03-2009, 08:40 AM
hi all

recently change host and in the switch my swap images scipt/pictures have stopped working.

can anyone see anything wrong? all the pictures are uploaded. I've taken the site down, and back up again, Ive removed picturesand then replaced them. dont know where i'm going wrong:confused:

http://www.courtesan-boutique.co.uk/shop/nopcart/lollipop.html

thanks!

d a v e
04-03-2009, 10:00 AM
it''s maybe because you've used periods (fullstops) in your filenames
e.g.
lollipop.purple.jpg

should be
lollipoppurple.jpg
or
lollipop-purple.jpg
or
lollipop_purple.jpg

lola
04-03-2009, 10:17 AM
although they all worked before i switched. they work, just not when uploaded, its like they just cant find the pictures.

lola
04-03-2009, 10:25 AM
didnt work. thanks anyway Dave.

My old host didnt have a public_html folder. my new host does. everything on my site is now in the public_html folder, and i've removed images and put them back... but still not working.

my directory (offline) goes something like this c:/my documents/mycompany/mywebsite/public_html/dresses/fairytale/image.X

and when i create a link to image X it puts

../../dresses/fairytale/image.X.jpg

does this look normal?

Corrosive
04-03-2009, 11:07 AM
didnt work. thanks anyway Dave.

My old host didnt have a public_html folder. my new host does. everything on my site is now in the public_html folder, and i've removed images and put them back... but still not working.

my directory (offline) goes something like this c:/my documents/mycompany/mywebsite/public_html/dresses/fairytale/image.X

and when i create a link to image X it puts

../../dresses/fairytale/image.X.jpg

does this look normal?

Depends on where your 'dresses' folder is in your site structure. I'd expect something a bit more like this...

/dresses/fairytale/image.X.jpg

d a v e
04-03-2009, 11:08 AM
no that doesn't look normal - not sure why it would do that - may have to wait for someone more technically minded to come along ;)

does it work locally?

Corrosive
04-03-2009, 11:21 AM
DJ wrote a nice post on image links...

http://www.dreamweaverclub.com/forum/showthread.php?t=31454

Have a read.

d a v e
04-03-2009, 12:02 PM
how are you making the links to the images?

domedia
04-03-2009, 06:09 PM
The JavaScript in your head section is very messed up. Look like something/someone just pasted a full JavaScript tag inside another.
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

<script language="JavaScript"><!--
function swap(target, source) {
if (document.images) {
document.images[target].src = document.images[source].src;
document.images[target].width = document.images[source].width;
document.images[target].height = document.images[source].height;
}
}
//--></script>

//-->
</script>

davidj
04-04-2009, 08:52 AM
cut and paste job!

without a doubt