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

Basic Java / ASP Question


Poster: dmcquade
Dated: Monday October 30 2006 - 22:15:34 GMT

Hey everyone,

I have an ASP page that has a number of Milonic menus on it. For each menu I need to send one or more variables to my menu_data.js (now menu_data.asp) page. Does anyone know how this can be done? It seems like it reads the file once at the beginning so my variables aren't going through.

Here's another way to think about this. Lets say I have a list of records with database ID's 1,2,3. I need to create a new menu for each record that has a link to display_record.asp?record_id=1 and so on.

Anyone try this?

DJ


Poster: kevin3442
Dated: Tuesday October 31 2006 - 2:27:20 GMT

Hi DJ,

You've probably seen my other post by now. Don't know if it helped.

Your asp code is only processed on the server side. Once the code hits the client (browser), your variables are no longer variables; no longer available to asp processing.

It sound to me like you're doing your database query in one file, and building the menu in another (menu_data.asp). Instead, try doing all of it in one file... query the database, loop through the record set, and build the menu, all in menu_data.asp.

Alternatively, put the menu definitions in as inline javascript (you could even do it in an include file), so that, again, you're looping through the recordset and building the menu in the same asp file.

Hope that helps,

Kevin