|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Member (7 bit)
Join Date: Dec 2005
Posts: 87
|
Javascript \ escape problems
I have the following code to change pictures when a javascript button is pressed:
piccontainerobj.innerHTML=' 'The only problem is that the \ don't appear. The image isn't found, and when I click on properties I get the address as uploadedImagesproductspic28.jpg I want to use \ vs. / to save on bandwidth. If I use / than everything is read remotely instead of locally. |
|
|
|
|
|
#2 |
|
Barefoot on the Moon!
Staff
Premium Member
Join Date: Aug 2002
Location: Northeastern USA
Posts: 13,385
|
I'm not quite sure what you're asking. If you're trying to get something using an address in javascript, you need to start from the location of your page, then navigate to whichever folder the item is in using .. and /
for example, if your html page is in the main directory, and your images are in a folder called "images" you'll have to use something like this: images/myimage.jpg But, if in your main folder you have two seperate folders--one for images and one for your html pages, you'll have to use something like this: ../images/myimage.jpg
__________________
There are two secrets to staying young, being happy, and achieving success. You have to laugh and find humor every day, and you have to have a dream.
|
|
|
|
|
|
#3 |
|
Member (7 bit)
Join Date: Dec 2005
Posts: 87
|
Yeah sorry. I just got mixed up. I have my testing server as windows and I was uploading to a unix machine.
The moral of this story kids is to not work projects late at night when you are drinking. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|