Menu item returning to previous page

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
rybrns
Beginner
Beginner
Posts: 6
Joined: Wed Oct 17, 2007 12:20 am

Menu item returning to previous page

Post by rybrns »

Can the menu system handle a JavaScript call to return to the previous page? I tried

Code: Select all

url=javascript:history.go(-1)
in the menu definition line and it didn't appear to work.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: Menu item returning to previous page

Post by Ruth »

Hi,

Try this post

viewtopic.php?p=26725&highlight=#26725

Ruth
rybrns
Beginner
Beginner
Posts: 6
Joined: Wed Oct 17, 2007 12:20 am

Re: Menu item returning to previous page

Post by rybrns »

That's exactly what I did. Same syntax. Didn't work on my local machine, but did when I tried it on my site. Very strange.

This perhaps has something to do with the problem in my other post, the one about site structure.

Thanks.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: Menu item returning to previous page

Post by Ruth »

I think that the problem is with the local machine because it doesn't use http. Doesn't it go something like C:\\\ or something? I don't do things locally except by putting everything in the same folder to test then changing it for the web if it looks OK. :?

I think to do something like you want on the local machine you have to get some kind of setup so that you can do it like the web. Isn't there an apache thing to do that? So you can set up your web structure on your local machine?

Ruth
rybrns
Beginner
Beginner
Posts: 6
Joined: Wed Oct 17, 2007 12:20 am

Re: Menu item returning to previous page

Post by rybrns »

I've installed the Apache server software on my local machine, and it seems to work ok, except that I can't get it to work right with both Dreamweaver and Windows so that I can use my browser to open local files without going through the server. Going back and forth between configurations was one big pain, so I stopped trying to use it.

The problem I am having is knowing where in the directory structure the Milonic menu thinks it is when the menu data file (and the other menu files) are in a directory remote from the file displaying the menu. I can't use relative addressing based on where the menu files are stored; I see some pretty strange results when I do that if I use the menus to retrace my steps back to revisit pages.

From your answer it appears that there really isn't a way to get the menus to navigate the same way under Windows and under http if the site has a complex directory structure.
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Re: Menu item returning to previous page

Post by John »

This works for me...

Code: Select all

javascript:history.back();
John
rybrns
Beginner
Beginner
Posts: 6
Joined: Wed Oct 17, 2007 12:20 am

Re: Menu item returning to previous page

Post by rybrns »

Yes, I have it working with javascript:history.go(-1). The problem was that it didn't work on my local computer for some reason, but it works on the web site.
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Re: Menu item returning to previous page

Post by John »

Actually that was my point. What I posted works fine on my local setup and, of course, the remote server.
John
rybrns
Beginner
Beginner
Posts: 6
Joined: Wed Oct 17, 2007 12:20 am

Re: Menu item returning to previous page

Post by rybrns »

In my case it doesn't because of the way I need to set the addressing.
Post Reply