HI. Sorry, I'm not understanding what you mean. Can you elaborate a little?
Thank you!
Main Topics
Browse All TopicsHi. I'm using Spry on Dreamweaver CS3 and I am a newbie. I have it functioning, but when I go from, say the Contact Us drop down over to Ministries dropdown, I get broken links. I've started looking deeper into the issue and it appears that Spry is adding both the directory that the user comes from and the directory they are going to.
htlc.pcbydesign.net. That is the website. Try it for yourself. I could use some ideas on this if someone can help.
Running on Server 2003 / IIS 6.
Thank you much! :)
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I noticed when you have a folder name or web page name that is more than one word you have spaces in them - THAT'S A BIG FAT NO-NO and NOT recommended for web development. This goes for PDF's, images, everything.
For example - folder "Communications Pages" or web page "Adult Education.html". Change those spaces to underscore symbol. IE: _
Since you are using Dreamweaver, if you rename folders or files in Dreamweaver it will update all pages calling that folder or files. Then just re-upload your entire site. In the files list in Dreamweaver if you left-click to highlight a file, then wait a second and left-click again that puts you in rename file mode.
Those spaces could very well be your problem and I've seem them screw up things or create wacky results in the past.
For more detailed reference, check out the section about 3/4 down this page called "Don't hit the space bar" http://www.netmechanic.com
Regards,
Torrey
PS: like the site!
I assume you have directories set up like so:
/index.html
/About Us Pages
/Ministries
If so, the reason you are getting 404 errors is that your links are wrong in the menus on the pages in those subdirectories. For example, when in "About Us Pages" your menu code looks like this:
<li><a class="MenuBarItemSubmenu"
<ul>
<li><a href="Who We Are.html">Who We Are</a></li>
<li><a href="Membership Info.html">Becoming A Member</a></li>
<li><a href="Virtual Tour.html">Virtual Tour</a></li>
<li><a href="Staff.html">Staff</a></l
<li><a href="../Forms/About Us Forms/Church History.pdf" target="_blank">Church History</a></li>
</ul>
</li>
<li><a href="Ministries.html" class="MenuBarItemSubmenu"
<ul>
<li><a href="Ministries/Youth.htm
<li><a href="Ministries/Children.
<li><a href="Ministries/Discoveri
<li><a href="Ministries/Adult Education.html">Adult Education</a></li>
<li><a href="Ministries/Small Groups.html">Small Groups</a></li>
<li><a href="Ministries/Matthew 25.html">Matthew 25 (Service)</a></li>
<li><a href="Ministries/Volunteer
<li><a href="Ministries/Music.htm
</ul>
</li>
Because all the Ministries links read "Ministries/page.html" the browser is attempting to look for a page in the following path:
htlc.pcbydesign.net/About Us Pages/Ministries/page.html
instead of
htlc.pcbydesign.net/Minist
This is a simple path error. It's a little unusual that DW did not correct the paths for you but there are ways to screw this up and apparently you found one. Most likely you copy-pasted the Spry menu from page to page. What works at the top level won't work at the sub-levels in that event (unless you use root-relative links). What you need to is set all links to root-relative or correct the links to be document-relative.
Root relative links always begin with a / The slash tells the browser to start looking for the document from the site root. So the menus would look like this (again, starting from a page in "About Us Pages"):
<li><a class="MenuBarItemSubmenu"
<ul>
<li><a href="Who We Are.html">Who We Are</a></li>
<li><a href="Membership Info.html">Becoming A Member</a></li>
<li><a href="Virtual Tour.html">Virtual Tour</a></li>
<li><a href="Staff.html">Staff</a></l
<li><a href="/Forms/About Us Forms/Church History.pdf" target="_blank">Church History</a></li>
</ul>
</li>
<li><a href="/Ministries.html" class="MenuBarItemSubmenu"
<ul>
<li><a href="/Ministries/Youth.ht
<li><a href="/Ministries/Children
<li><a href="/Ministries/Discover
<li><a href="/Ministries/Adult Education.html">Adult Education</a></li>
<li><a href="/Ministries/Small Groups.html">Small Groups</a></li>
<li><a href="/Ministries/Matthew 25.html">Matthew 25 (Service)</a></li>
<li><a href="/Ministries/Voluntee
<li><a href="/Ministries/Music.ht
</ul>
</li>
All the links with a / will start looking from the site root no matter what level this document resides at.
The other way to do it is use document-relative links. These links start looking for the path based on the current path and you use ../ to indicate to the browser that you want to make a request in a higher-level folder.
<li><a class="MenuBarItemSubmenu"
<ul>
<li><a href="Who We Are.html">Who We Are</a></li>
<li><a href="Membership Info.html">Becoming A Member</a></li>
<li><a href="Virtual Tour.html">Virtual Tour</a></li>
<li><a href="Staff.html">Staff</a></l
<li><a href="../Forms/About Us Forms/Church History.pdf" target="_blank">Church History</a></li>
</ul>
</li>
<li><a href="../Ministries.html" class="MenuBarItemSubmenu"
<ul>
<li><a href="../Ministries/Youth.
<li><a href="../Ministries/Childr
<li><a href="../Ministries/Discov
<li><a href="../Ministries/Adult Education.html">Adult Education</a></li>
<li><a href="../Ministries/Small Groups.html">Small Groups</a></li>
<li><a href="../Ministries/Matthe
<li><a href="../Ministries/Volunt
<li><a href="../Ministries/Music.
</ul>
</li>
To prevent this problem from occurring again, don't copy-paste menu code. Instead, pick a page and do a Save-As to make a new page in a new location. DW should prompt you to update the links when you do this and you should allow it to do so. The newly saved-as page would then have the correct paths on the menu.
I thought that since I made the menu once, then copied to all pages, that once I recreated it inside of each page, that it would work, but it still doesn't. I know I've already assigned points, but can you advice? I changed the About Us Section, but when I'm in About Us and try to click a link over to, say Ministries, I get the 404 error. Changed the links to root level. What am I missing?
Thanks!
I did upload yesterday, but didn't see any change, so I started making other changes. I'll reupload again.
The way I'm changing the links in Dreamweaver, I went to manage sites, then changed the links from page relative to root, but is there another way I need to do it?
I've always just left them at page relative. Is it better pratice to go to root relative?
I've uploaded a image.
Thanks
>> The way I'm changing the links in Dreamweaver, I went to manage sites, then changed the links from page
>> relative to root, but is there another way I need to do it?
Changing it in the site definition only affects future documents. You do need to go through each of your pages and change the links by hand to correct the problem.
>> I've always just left them at page relative. Is it better pratice to go to root relative?
It really is six of one, half-dozen of the other. It depends on your personal preference and (to some extent) how your site is set up. If you have very few folders and subfolders, it is probably easier to use document relative. If your site has lots of folder depth, root relative may be better.
When you only have one or two levels of folders, all links will look like this:
<a href="path/to/secondlevelp
or
<a href="../../index.html">Goi
That's pretty easy to see and understand. But if your site has four or five levels of folders document relative links begin to look pretty messy:
<a href="path/to/a/page/five/
That's not too bad. But going back up is ugly:
<a href="../../../../../index
Trying to keep track of all of the ../ iterations is a pain. It's worse when you try going up a few levels, then back down a few levels:
<a href="../../a/new/path/ind
Whereas if you use root relative in the same situation:
<a href="/index.html">Going back up</a>
<a href="/path/to/a/new/path/
But both methods are correct.
>> then copy the data over from the old to the new, will my links update?
I don't think so, because the links are wrong to begin with. If you declare root relative or document relative in the site definition and then fix the links to be consistent with that choice you will be in better shape. However, copy/paste is NOT the right action. Instead, doing File | Save As is the proper way. DW will prompt you to update links and the links should update.
I forgot another advantage of root-relative links: you can use a menu with root relative links as an include or library item since the links work no matter where the page is in the folder hierarchy. This means that all you have to do is maintain ONE menu and simplifies site updates and management tremendously.
It's going to depend on what page you are fixing. The About Us links IN THE ABOUT US pages are correct. They don't need ../ because they are linking to files at the same level:
<li><a class="MenuBarItemSubmenu"
<ul>
<li><a href="Who We Are.html">Who We Are</a></li>
<li><a href="Membership Info.html">Becoming A Member</a></li>
<li><a href="Virtual Tour.html">Virtual Tour</a></li>
<li><a href="Staff.html">Staff</a></l
That's correct. The AboutUs.html page is one level up. All other pages are at the same level.
The Ministry pages are incorrect and generally would need a / or ../ in the href attribute.
The About Us links IN THE ABOUT US pages are correct. They don't need ../ because they are linking to files at the same level:
Are you saying they don't need ../ because they are all in the same directory? Inside of each directory (About us links all in the About directory), are all working okay. But when I try to go from a page from within the About Us to a page in the Ministry, thats where it errors.
This is where I'm still unclear what to fix. Wouldn't I make the same changes sitewide? When I get the 404 error, I just remove the previous directory in the browser and then it goes. A example is -
About Us- Who we are:
http://htlc.pcbydesign
Then if I try to go to Adult Ed. in the Ministries, I get this:
http://htlc.pcbydesig
If I take away the previous directory (About_Us_Pages) then it goes just fine. But I don't know how to tell my links not to grab the previous directory.
Sorry if you feel you are repeating yourself, but this has me overthinking it probably.
>> Are you saying they don't need ../ because they are all in the same directory?
Yes. When a target is at the same level as the page with the link, is correct. If the target is ANYWHERE else, you need to add directory indicators. Either the ../ to indicate a higher level or the directoryname/ to indicate a lower level or both. Or use root relative and just have /path/to/page.html for everything.
>> Wouldn't I make the same changes sitewide?
For root relative, yes. For DOCUMENT relative, no. The paths change depending on where the document is.
>> About Us- Who we are: http://htlc.pcbydesign.net
>> Then if I try to go to Adult Ed. in the Ministries, I get this: http://htlc.pcbydesign.net
>> /Adult_Education.html.
Okay
The reason you get the 404 in the above situation is because the link for Adult_Education looks like this:
<a href="Ministries/Adult_Edu
So because you are starting in:
http://htlc.pcbydesign.
T
So to be correct, you would need to change the link to:
<a href="../Ministries/Adult_
OR
<a href="/Ministries/Adult_Ed
The first link says GO BACK UP ONE LEVEL, THEN FIND "Ministries" AND THEN FIND THE PAGE "Adult_Education" IN FOLDER "Ministries"
The second link says I DON'T CARE WHERE I AM STARTING FROM, GO BACK TO THE HIGHEST LEVEL AND THEN FIND "Ministries" AND THEN FIND THE PAGE "Adult_Education" IN FOLDER "Ministries"
Does this make sense yet?
>> Sorry if you feel you are repeating yourself, but this has me overthinking it probably.
No apologies needed. This is a hugely important concept for web designers and you need to understand how to write links correctly. Otherwise you spend hours and hours troubleshooting something that should have been done correctly the first time out. Too many people use Dreamweaver as a crutch not realizing that it is affected by the same garbage-in, garbage-out concept that the rest of software is governed by.
Just to clarify one thing -
So to be correct, you would need to change the link to:
<a href="../Ministries/Adult_
OR
<a href="/Ministries/Adult_Ed
The document relative level would be ../ and the root relative level would be /
Correct? Just want to make sure I understand this.
Business Accounts
Answer for Membership
by: IanThPosted on 2009-10-20 at 14:13:37ID: 25618698
have you got say folders setup like ministries as thats what you code is saying all your ministry links are in a folder called ministries l">Youth</a></ li> html">Child ren</a></li> es.html">Sm all Discoveries Preschool</a></li> s.html">Vol unteers</a></ li> l">Music</a></ li>
n</a></li> l Discoveries Preschool</a></li>
<li><a href="Ministries/Youth.htm
<li><a href="Ministries/Children.
<li><a href="Ministries/Discoveri
<li><a href="Ministries/Adult Education.html">Adult Education</a></li>
<li><a href="Ministries/Small Groups.html">Small Groups</a></li>
<li><a href="Ministries/Matthew 25.html">Matthew 25 (Service)</a></li>
<li><a href="Ministries/Volunteer
<li><a href="Ministries/Music.htm
</ul>
I bet you havent and it should read
<li><a ref="children.html">Childre
<li><a ref="discoveries.html">Smal
etc