Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:27

Menu item returning to previous page


Poster: rybrns
Dated: Wednesday October 17 2007 - 1:08:31 BST

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

Code:
url=javascript:history.go(-1)


in the menu definition line and it didn't appear to work.

Re: Menu item returning to previous page


Poster: Ruth
Dated: Wednesday October 17 2007 - 2:08:48 BST

Hi,

Try this post

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

Ruth

Re: Menu item returning to previous page


Poster: rybrns
Dated: Wednesday October 17 2007 - 4:10:27 BST

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.

Re: Menu item returning to previous page


Poster: Ruth
Dated: Wednesday October 17 2007 - 6:57:54 BST

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

Re: Menu item returning to previous page


Poster: rybrns
Dated: Wednesday October 17 2007 - 17:04:25 BST

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.

Re: Menu item returning to previous page


Poster: John
Dated: Wednesday October 17 2007 - 18:24:49 BST

This works for me...
Code:
javascript:history.back();

Re: Menu item returning to previous page


Poster: rybrns
Dated: Wednesday October 17 2007 - 18:31:36 BST

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.

Re: Menu item returning to previous page


Poster: John
Dated: Wednesday October 17 2007 - 18:59:56 BST

Actually that was my point. What I posted works fine on my local setup and, of course, the remote server.

Re: Menu item returning to previous page


Poster: rybrns
Dated: Wednesday October 17 2007 - 19:08:12 BST

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