Shopper ID Question

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
justinrk
Beginner
Beginner
Posts: 6
Joined: Thu Jan 27, 2005 6:31 pm

Shopper ID Question

Post by justinrk »

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
Thank You For Any Assistance!!!!
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

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

Kevin
justinrk
Beginner
Beginner
Posts: 6
Joined: Thu Jan 27, 2005 6:31 pm

Thanks!!!

Post by justinrk »

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
Thank You For Any Assistance!!!!
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Re: Thanks!!!

Post by kevin3442 »

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: Select all

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
justinrk
Beginner
Beginner
Posts: 6
Joined: Thu Jan 27, 2005 6:31 pm

Post by justinrk »

Thanks I will try that...
Thank You For Any Assistance!!!!
justinrk
Beginner
Beginner
Posts: 6
Joined: Thu Jan 27, 2005 6:31 pm

Still No luck

Post by justinrk »

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

Post by John »

Use Kevin's example above, but try changing the suffix on your _data file to .asp from .js.
John
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

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: Select all

<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
justinrk
Beginner
Beginner
Posts: 6
Joined: Thu Jan 27, 2005 6:31 pm

Post by justinrk »

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
Thank You For Any Assistance!!!!
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

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: Select all

<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: Select all

<a href="<%=pageURL("webfolder/webpage.asp")%>">Text Link</a>
would become

Code: Select all

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

Code: Select all

<a href="<%=baseURL("webfolder/webpage.asp") & mscsPage.URLSHopperArg()%>">Text Link</a>
would become

Code: Select all

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

Code: Select all

<a href="<%=rootURL%>webfolder/webpage.asp?mscssid=<%=mscsShopperID%>">text link</a>
would become

Code: Select all

aI("text=Item Name;url=<%=rootURL%>webfolder/webpage.asp?mscssid=<%=mscsShopperID%>;");
Give those a shot and let us know if they work.

Cheers,

Kevin
justinrk
Beginner
Beginner
Posts: 6
Joined: Thu Jan 27, 2005 6:31 pm

Post by justinrk »

Nope.

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

Thanks again for all your help.
Thank You For Any Assistance!!!!
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

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