Click to See Complete Forum and Search --> : syntax to attach asp query string in javascript


stevenbali
05-12-2003, 03:14 AM
I am using a javascript menu to navigate between pages. Many pages requires a member id to operate. I have no problems with the following:

,"Charter Members","memCharter.asp"

but I need to add the equivalent of "?Id=Session("memid")" to make the page work.

You have something similar at the top of this page with:

http://forums.webdeveloper.com/newthread.php?s=&action=newthread&forumid=3

I'm sure this is so basic but I haven't been able to find a reference to it anywhere!:confused:

stevenbali
05-12-2003, 12:22 PM
Hi Dave and thanks for answering.

I started with a menu in asp, but then moved to javascript for a different one because my original wouldn't work with browsers of 4- ilk.

The answer you gave me was exactly what I had been using in the asp page and was fine. But now in the javascript that line gives an error "expected ']'" To give a better idea of the javascript menu (sorry I didn't do this first), here is a bit more text:

addmenu(menu=["membership",
,,115,1,"",style1,,"left",effect,,,,,,,,,,,,
,"New Members","show-menu=newmem",,,1
,"Charter Members","memCharter.asp?Id=<%=Session("memid")%>" ,,,1
,"Current Members","show-menu=currentmem",,,1
,"Fellowship","show-menu=fellowship",,,1
])

This is what gave the error message above.

Instead I am expecting that the answer may lie with something more like ,"memCharter.asp?Id=" & CStr(Session("memid"))"