How to get “document.getElementById” src to be a relative url on a Mamp local environment with multiple websites folders
Moderator: General Support Moderators
Forum rules
Forum Rules
Absolute Beginner’s Guide to Joomla! <-- please read before posting.
Forum Post Assistant – If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Forum Rules
Absolute Beginner’s Guide to Joomla! <-- please read before posting.
Forum Post Assistant – If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
- Joomla! Guru
- Posts: 974
- Joined: Wed Feb 20, 2008 6:50 am
- Location: Canada, Montreal
- Contact:
How to get “document.getElementById” src to be a relative url on a Mamp local environment with multiple websites folders
I made a Javascript snippet to change an image with others when pressing buttons.
The working code is;
Code: Select all
- Joomla! Master
- Posts: 27358
- Joined: Mon Oct 27, 2008 9:27 pm
- Location: Romerike, Norway
Re: How to get “document.getElementById” src to be a relative url on a Mamp local environment with multiple websites fol
Use a relative path starting with a dot (current ditectory) i.e "./images"
-
- Joomla! Enthusiast
- Posts: 184
- Joined: Sun Dec 28, 2014 9:30 am
- Location: Stavanger, Norway
Re: How to get “document.getElementById” src to be a relative url on a Mamp local environment with multiple websites fol
Set up virtual hosts in your local environment.