Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hierarchical menus in ASP?

Status
Not open for further replies.

atipul

Programmer
Nov 2, 2001
1
CA
Hi,
there is a great site:
that shows you how to set up Hierarchical menus in Javascript. The question is, can this be done in ASP?

I want to know, since I already have an ASP page connecting to a SQL7 DB, and I would like it to drop down additional table entries when activating a link (showing additional data from the Database).

If this is not possible, is there a way to pass an asp variable to javaScript?

Atipul
 
Sure, just write it right into the JavaScript script like this.
Code:
<script Language=&quot;JavaScript&quot;>
<!--
var someJSVar = <%=someASPVar%>
//-->
</script>
Now that's a very watered down example, but you can setup a recordset loop to populate a JavaScript array, or whatever you want.

Now, if you want to post the menu items in a .js file, that's going to get a little tricky. You might want to move the portion of the JS that defines the menu items out of the file and place them in an ASP include. Give and take right ??

ToddWW
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top