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:56

Shopper ID Question


Poster: justinrk
Dated: Thursday January 27 2005 - 17:41:13 GMT

I am looking into using the current version and I was wondering does the DHTML menu URL's can handle shopper id's

example url: http://www.mypage.asp?mscssid=ASDFJGJVCXZMBVCNMFD

So that when select for any the menus the shopper id will appear automatically.

If anyoune could let me know before I purchase a license that would be great.

Thank You :D


Poster: kevin3442
Dated: Thursday January 27 2005 - 18:08:51 GMT

Yes, you can pass parameters in a menu item's url.

Kevin

Thanks!!!


Poster: justinrk
Dated: Thursday January 27 2005 - 22:18:02 GMT

Hey Kevin Thank You for your reply....

How do you Pass the parameters, can you help out tell showing or telling me how do this.

Thansk Again for you help :D

Re: Thanks!!!


Poster: kevin3442
Dated: Thursday January 27 2005 - 23:08:32 GMT

Hi Justin,
justinrk wrote:
How do you Pass the parameters, can you help out tell showing or telling me how do this...

When you build a menu item, one of the properties you set in the string passed to aI() is the url property. You construct it exactly as you showed in your example, just as if you were passing it from a standard text link.
Code:
aI("text=Item Text;url=http://www.mysite.com/mypage.asp?param1=param1Value&param2=param2Value;");

You don't have to use the http:// if you don't want to. The same pathing rules apply as would apply in any other code on the page.

Cheers,

Kevin


Poster: justinrk
Dated: Friday January 28 2005 - 21:19:52 GMT

Thanks I will try that...

Still No luck


Poster: justinrk
Dated: Saturday January 29 2005 - 9:13:26 GMT

What I am trying to do is to have mscssid "shopper ID" that is assign when logged onto the website.

like this website http://www.clarkbookstore.com


So when you click on the drop menus it shows in the address bar link plus with an assigned mscssid # for this session.

Any ideas or help would be greatly appreciated.

Thank You!!!


Poster: John
Dated: Saturday January 29 2005 - 17:15:28 GMT

Use Kevin's example above, but try changing the suffix on your _data file to .asp from .js.


Poster: kevin3442
Dated: Saturday January 29 2005 - 21:49:39 GMT

Hi Justin,

Sorry... I didn't realize initially that you had a specific parameter in mind; I thought you were interested in how to pass a parameter in a menu url in general.

I'm not familiar with the system you mentioned, that uses mscssid. From the example you gave, I understand that it's asp related, but I don't know what kind of value it is. Is the mscssid or "Shopper ID" a Session variable, the result of a database query, already assigned in a variable on the page, or what? Suppose you wanted to create a text link in your document to include the mscssid, what asp code would you use. Would it be as simple as,
Code:
<a href="/mypage.asp?mscssid=<% =mscssid %>">text link</a>

If you can tell me that, I can help you with the code you'd use to get the value into your menu urls.

Cheers,

Kevin


Poster: justinrk
Dated: Sunday January 30 2005 - 1:11:07 GMT

Hi Kevin,

First I just wanted to say "Thank You" for assisting me with this :D

The asp code I use for the site that I represent are as follows:

href="<%=pageURL("webfolder/webpage.asp")%>"

or

href="<% = baseURL("webfolder/webpage.asp") & mscsPage.URLSHopperArg ()%>"

or

href"<%= rootURL%>webfolder/webpage.asp?mscssid=<%mscsShopperID%>"

These are types of links we have to use inorder on our server to show the mscss=shoppid numbers for everylink within the page.

Another website example http://www.universitybookstores.com
They have a drop down menu and in the link address is shows the mscssid number.

I am a "newbie" with drop down menus and really do appreciate you working with me on this :D

Thanks, Justinrk


Poster: kevin3442
Dated: Sunday January 30 2005 - 5:55:18 GMT

Hi Justin,
justinrk wrote:
First I just wanted to say "Thank You" for assisting me with this :D

You're welcome. I'm not an asp guru, but I've been dabbling recently, and I think I can help. Essentially, you'll want to incldue some asp code in your menu_data javascript. So, if you have your menu_data code defined in an external .js file (e.g., menu_data.js), then the first thing to do is, as John said, rename your menu_data.js file to menu_data.asp. Make sure that you also change the filename in the src= attribut of the <script> block you use to load the file into the page, e.g.,
Code:
<script type="text/javascript" src="menu_data.asp"></script>

This will ensure that your menu code goes through the asp parser on the server side, essentially letting you include asp commands in your javascript (it's really the other way around once you name the file .asp... i.e., you're including javascript in your asp file, but the file is still mostly static javascript, with a few asp commands thrown in here and there).

To define a menu item, you would set the item's url parameter by mixing plain text with asp code, just as you do in your <a> links on an asp page. Using your examples,

Example 1:
Code:
<a href="<%=pageURL("webfolder/webpage.asp")%>">Text Link</a>

would become
Code:
aI("text=Item Name;url=<%=pageURL("webfolder/webpage.asp")%>;");


Example 2:
Code:
<a href="<%=baseURL("webfolder/webpage.asp") & mscsPage.URLSHopperArg()%>">Text Link</a>

would become
Code:
aI("text=Item Name;url=<%=baseURL("webfolder/webpage.asp") & mscsPage.URLSHopperArg()%>;");


Example 3:
Code:
<a href="<%=rootURL%>webfolder/webpage.asp?mscssid=<%=mscsShopperID%>">text link</a>

would become
Code:
aI("text=Item Name;url=<%=rootURL%>webfolder/webpage.asp?mscssid=<%=mscsShopperID%>;");

Give those a shot and let us know if they work.

Cheers,

Kevin


Poster: justinrk
Dated: Tuesday February 1 2005 - 5:53:24 GMT

Nope.

Did not work, I tried them all. Any other ideas I could try???

Thanks again for all your help.


Poster: kevin3442
Dated: Tuesday February 1 2005 - 17:05:47 GMT

Hi Justin

I'm at a loss to explain why none of those worked. If they worked in your html code, they should also work in your menu's js code. Did you remember to rename the menu_data.js file to menu_data.asp?

At this point, it's going to be difficult trying to move forward without some actual code to look at and work with. Ideally, if you could give me temporary access to your site, I could go in and test some things. If that's not possible, then could you post examples of: (1) the .asp file for one of the pages where you want the menu, (2) the menu_data.asp code that you're using.

When posting code, please surround the code with the BBS code tags, like so:

<b>[code]</b>
My code that
I'm posting
<b>[/code]</b>

Cheers,

Kevin