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: Archived Topics for the old Version 3.0 JavaScript Menu
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:18

Pass a sentence in URL?


Poster: yanto75
Dated: Friday August 22 2003 - 15:53:52 BST

Hi

(Hergio: Now I've searched this forum and Google for quite a while ;) )

My objective is to pass several words after the URL like this:

addmenu(menu=["submenu",
,,185,1,"",style2,,"left",effect,,,,,,,,,,,,
,"A nice page","/subfiles/sub/mypage.asp?sendParam=Keyword1 Keyword2",,"Keyword1 keyword2",1
])

I've tried to use javascript escape(), something like

mypage.asp?sendParam=escape('Keyword1 Keyword2') or something, but it doesn't work. I can't find the correct syntax for some reason.. well, it actually worked once when I used it on the first pull-down menu, but not for sub-menus that fold out horizontally..

anyone knows..? :)


Poster: Hergio
Dated: Friday August 22 2003 - 16:00:17 BST

You need to escape them yourself before it goes into the menu script. I did this on my site where I wanted something passed, so I did /dir/page.asp?var1=My%20First%20Var and this worked...basically its if you have any spaces or quotes in the url, whether they are in the query string or in a directory name (i.e /Dir One/ or /Sue'sDir/ cuz Microsoft allows this I know), you need to escape it before it goes into the menu. You could do this by saying
escapedquery = escape("My First Var");
and then doing ..,"page.asp?var1=" + escapedquery + ",...
But thats the problem I think. ;)


Poster: Andy
Dated: Friday August 22 2003 - 16:23:18 BST

Can I just butt in here and make a sugestion?
. . . . . . .Well, I'm going to anyway :D

Version 3.0 has some pretty poor text handling that uses lots of escapes in the text it generates. Once you start adding more escape characters to it, it does get a little messy.

Version 5.0 on the other hand should be able to handle the text much more efficiently and including escape characters shouldn't pose too much of a problem.

Cheers
Andy


Poster: yanto75
Dated: Friday August 22 2003 - 16:47:04 BST

Thanks Hergio and Andy for your fast replies :)

Okay, I will try to make a separate variable first.. (and make the big .js file even bigger :)

Else, maybe I will try v5 like Andy suggested.. guess it can't be more complicated than making this work :)


Poster: John
Dated: Friday August 22 2003 - 16:50:06 BST

yanto75 wrote:
Else, maybe I will try v5 like Andy suggested.. guess it can't be more complicated than making this work :)

Not more complicated - just different.

I would suggest going to v5 right now, since development has stopped on v3 and, technically, it is no longer supported.


Poster: yanto75
Dated: Saturday August 23 2003 - 18:47:51 BST

Yes !!!!! :))) Now I'm extremely happy because it works out perfectly.. !!! I've upgraded to v5 menu and I can now send params the way I want, and will send them to an include file recipient, to make the site more dynamic..

Super!! thanks :)