Pass a sentence in URL?

Please note that official support for this menu version has now ceased. There are still plenty of users, though, and the forum is still running. Some of our long-time users may be able to help you out.
Post Reply
yanto75
Advanced
Advanced
Posts: 17
Joined: Sun Aug 17, 2003 10:48 am
Location: Sweden
Contact:

Pass a sentence in URL?

Post by yanto75 »

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..? :)
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

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. ;)
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

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
yanto75
Advanced
Advanced
Posts: 17
Joined: Sun Aug 17, 2003 10:48 am
Location: Sweden
Contact:

Post by yanto75 »

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 :)
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

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.
John
yanto75
Advanced
Advanced
Posts: 17
Joined: Sun Aug 17, 2003 10:48 am
Location: Sweden
Contact:

Post by yanto75 »

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 :)
Post Reply