logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > Javascript and JS frameworks
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 04-03-2009, 08:40 AM   #1
lola
 
Join Date: Oct 2008
Posts: 14
Default swap images stopped working

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

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

thanks!
lola is offline   Reply With Quote
Old 04-03-2009, 10:00 AM   #2
d a v e
 
Join Date: Feb 2006
Location: finland
Posts: 1,684
Default

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
d a v e is offline   Reply With Quote
Old 04-03-2009, 10:17 AM   #3
lola
 
Join Date: Oct 2008
Posts: 14
Default thanks

although they all worked before i switched. they work, just not when uploaded, its like they just cant find the pictures.
lola is offline   Reply With Quote
Old 04-03-2009, 10:25 AM   #4
lola
 
Join Date: Oct 2008
Posts: 14
Default

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?
lola is offline   Reply With Quote
Old 04-03-2009, 11:07 AM   #5
Corrosive
Corrosive's Avatar
 
Join Date: Feb 2008
Location: Bristol, England
Posts: 7,103
Default

Quote:
Originally Posted by lola View Post
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
Corrosive is offline   Reply With Quote
Old 04-03-2009, 11:08 AM   #6
d a v e
 
Join Date: Feb 2006
Location: finland
Posts: 1,684
Default

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?
d a v e is offline   Reply With Quote
Old 04-03-2009, 11:21 AM   #7
Corrosive
Corrosive's Avatar
 
Join Date: Feb 2008
Location: Bristol, England
Posts: 7,103
Default

DJ wrote a nice post on image links...

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

Have a read.
Corrosive is offline   Reply With Quote
Old 04-03-2009, 12:02 PM   #8
d a v e
 
Join Date: Feb 2006
Location: finland
Posts: 1,684
Default

how are you making the links to the images?
d a v e is offline   Reply With Quote
Old 04-03-2009, 06:09 PM   #9
domedia
Administrator
domedia's Avatar
 
Join Date: Dec 2003
Posts: 9,730
Default

The JavaScript in your head section is very messed up. Look like something/someone just pasted a full JavaScript tag inside another.
HTML Code:
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>
domedia is offline   Reply With Quote
Old 04-04-2009, 08:52 AM   #10
davidj
davidj's Avatar
 
Join Date: Sep 2005
Location: The Toon (newcastle upon Tyne)
Posts: 8,256
Default

cut and paste job!

without a doubt
__________________
Would you like to learn PHP from me? Check out -> www.codezenith.co.uk
davidj is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:39 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com