anjuliet,
The thing you're encountering is so common that most people use a no-brainer way of dealing with it: environments.
In probably 95% of all cases, as long as you keep in mind three different environments, you can do anything you want and it's never a hassle.
Production
In your case, the Production environment is the place out on the web that contains your files. A website is a bunch of different files, including .html, .jpg, .js, etc. They're all in the same environment and should be treated (usually) as a unit. The Production environment should be sacrosanct. What this means practically is that you don't be uploading willy-nilly stuff into it. Leave it alone.
Development
The Development environment is your sandbox. This is where you play with your code, dink around with your settings, and monkey with your .js files. Do anything you want in the Development environment. As a rule, the Development environment is
empty, unless you decide you want to play. Then, you
copy the contents of your Production environment into your Development environment. Then play as you wish.
Never go the other way. Never, never, never transfer
anything from Development to Production. If you've played around in Development and you think you now have something better than when you started, you transfer the entire contents of Development to...
Test
The Test environment, like the Development environment, is usually empty. The only time anything goes into it is when you're suddenly really happy about what you've got goin' on in the Development environment. The Test environment simulates as closely as possible your actual Production environment. In the case of a website, the Test environment is probably out on the server:
You copy the entire contents of Development to the Test environment and then you run the heck out of it. You test everything you can think of, and at least three things you can't. When you are satisfied that everything operates according to what you want in the Test environment, then you prepare to load Production. Back-up the entire contents of your Production environment (it is usually sufficient to copy all files into a directory such as
), and then transfer the contents of the Test environment to the Production environment. Test again and if at any moment it doesn't work, then copy the entire contents of your ProdBackup back to the production location and go back into the Test environment and keep troubleshooting.
It seems like an awkward bit of stepping, but it keeps to a minimum the amount of pain your experimenting can cause your users.
Hope that helps!
Cheers,
![[monkey] [monkey] [monkey]](/data/assets/smilies/monkey.gif)
Edward
"Cut a hole in the door. Hang a flap. Criminy, why didn't I think of this earlier?!" -- inventor of the cat door