Click to See Complete Forum and Search --> : menu creates wrong addresses.


hooloovoo24
10-25-2004, 03:38 PM
Hi, I'm having a problem with a cascading menu that I have, which uses javascript. The problem is this:

page 1 of my site is not in a folder. It has the menu in it, and when you select one of the options on the menu, it works fine and takes you to the page.

page 2 is in a folder, and also has the menu in it. When you select one of the options on the menu, it does NOT work fine.

The problem with page 2 is that it adds the menu option's url on to the end of the folder name. i.e.:

menu option 1 the url is "clerk/clerk.html"
if you are on page two, which is at the location "planning/planning.html", it changes the url so that it is "planning/clerk/clerk.html". Does that make sense?

Does anyone know how I can fix this? I have attached the .js file to the pages from a different folder. To help you out a bit, I attached this file to the message. Thanks in advance!

Tage
10-25-2004, 09:32 PM
Yes, that makes sense. Try using a / at the very front of the URL to go to the base of all folders first.

Example:
2 Subfolders to a main folder and each have an index.html
http://www.example.com/index.html
http://www.example.com/sub1/index.html
http://www.example.com/sub1/sub2/index.html

If you use <a href="index.html"> in any one of them, they will just reload themselves.
If you use <a href="sub1/index.html"> in any one of them, it will only work for the main folder.
To get to the index.html of the "sub1" folder from any folder use a / at the beginning like so. <a href="/sub1/index.html">
To get to the index.html of "sub2" from any folder use <a href="/sub1/sub2/index.html">
To get to the index.html of the main folder from any folder use <a href="/index.html">

Hey, could I have a gmail account? Lol... You don't have to. =) I hope this helps out.

Tage

hooloovoo24
10-26-2004, 11:48 AM
thanks so much, I'll try that! And sure you can have a gmail account :) I just need your current address to send you the invite.

hooloovoo24
10-28-2004, 03:00 PM
sorry, to be a bother again, but it's still not working. Any other ideas?

Tage
10-31-2004, 01:57 AM
Could you perhaps send me a link to the page it's not working on, or upload the page's full source code? If all else fails, you can always put exact addresses for everything instead of using relative adresses.

Tage

senshi
10-31-2004, 09:44 AM
Using the ../ tells the browser that it has to regress one folder tree back towards the root.

if your on page 2 and the page is in the planning folder and you attempt to goto page one, your URL is being looked for in the ./ folder, so if you add ../ to the URL and see if its a simple case of the URL addressing, needs addressing...

hooloovoo24
11-02-2004, 05:29 PM
None of the things you said worked. I put in the exact address, which is this: sample pages folder/clerk/clerk.html

And it changed it to this: sample pages folder/planning/clerk/clerk.html

And I tried what you said senshi (I think, at least as far as I understood it) and it didn't help anything either.

hooloovoo24
11-03-2004, 04:12 PM
Has anyone had a similar problem? Please, I need to figure this out!

hooloovoo24
11-03-2004, 04:16 PM
ok this is what I put in in the address part

"c:/my documents/melissa/sample pages site folder/clerk/clerk.html"
And it still for some reason added in finance/clerk/clerk.html.

This does not make sense!

hooloovoo24
11-16-2004, 04:00 PM
anyone? please! I desperatly need to figure this out my employers and getting antsy!