473,378 Members | 1,607 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

adding javascript menu

How can I add javascript to my code view of my default.aspx file and
get my meny to show?
Here is the code I want to display (it's obviously a menu):

<!-- menu script itself. you should not modify this file -->
<script language="JavaScript" src="menu.js"></script>
<!-- items structure. menu hierarchy and links are stored there -->
<script language="JavaScript" src="menu_items.js"></script>
<!-- files with geometry and styles structures -->
<script language="JavaScript" src="menu_tpl.js"></script>
<script language="JavaScript">
<!--//
new menu (MENU_ITEMS, MENU_POS);
//-->
</script>
Thanks,
Trint

Nov 20 '06 #1
3 1443
All you really need to do is just put it between the Body tags, exactly
where you want it to show. Before, with many pages in my site, I just
created an include file (yes, include), since there's nothing really dynamic
about it, put all the Javascript code in the include, then place the include
file between the body tags, exactly where you want it to show.

--
David Wier
MVP/ASPInsider
http://aspnet101.com
http://aspexpress.com
"trint" <tr***********@gmail.comwrote in message
news:11**********************@e3g2000cwe.googlegro ups.com...
How can I add javascript to my code view of my default.aspx file and
get my meny to show?
Here is the code I want to display (it's obviously a menu):

<!-- menu script itself. you should not modify this file -->
<script language="JavaScript" src="menu.js"></script>
<!-- items structure. menu hierarchy and links are stored there -->
<script language="JavaScript" src="menu_items.js"></script>
<!-- files with geometry and styles structures -->
<script language="JavaScript" src="menu_tpl.js"></script>
<script language="JavaScript">
<!--//
new menu (MENU_ITEMS, MENU_POS);
//-->
</script>
Thanks,
Trint

Nov 20 '06 #2
David,
I did as you said, and it still isn't showing after I do a build and
view in browser.
Thanks,
Trint
David Wier wrote:
All you really need to do is just put it between the Body tags, exactly
where you want it to show. Before, with many pages in my site, I just
created an include file (yes, include), since there's nothing really dynamic
about it, put all the Javascript code in the include, then place the include
file between the body tags, exactly where you want it to show.

--
David Wier
MVP/ASPInsider
http://aspnet101.com
http://aspexpress.com
"trint" <tr***********@gmail.comwrote in message
news:11**********************@e3g2000cwe.googlegro ups.com...
How can I add javascript to my code view of my default.aspx file and
get my meny to show?
Here is the code I want to display (it's obviously a menu):

<!-- menu script itself. you should not modify this file -->
<script language="JavaScript" src="menu.js"></script>
<!-- items structure. menu hierarchy and links are stored there -->
<script language="JavaScript" src="menu_items.js"></script>
<!-- files with geometry and styles structures -->
<script language="JavaScript" src="menu_tpl.js"></script>
<script language="JavaScript">
<!--//
new menu (MENU_ITEMS, MENU_POS);
//-->
</script>
Thanks,
Trint
Nov 20 '06 #3
Hey, I figured it out with this code sample from codeproject here:
http://www.codeproject.com/aspnet/webmenu.asp
trint wrote:
David,
I did as you said, and it still isn't showing after I do a build and
view in browser.
Thanks,
Trint
David Wier wrote:
All you really need to do is just put it between the Body tags, exactly
where you want it to show. Before, with many pages in my site, I just
created an include file (yes, include), since there's nothing really dynamic
about it, put all the Javascript code in the include, then place the include
file between the body tags, exactly where you want it to show.

--
David Wier
MVP/ASPInsider
http://aspnet101.com
http://aspexpress.com
"trint" <tr***********@gmail.comwrote in message
news:11**********************@e3g2000cwe.googlegro ups.com...
How can I add javascript to my code view of my default.aspx file and
get my meny to show?
Here is the code I want to display (it's obviously a menu):
>
<!-- menu script itself. you should not modify this file -->
<script language="JavaScript" src="menu.js"></script>
<!-- items structure. menu hierarchy and links are stored there -->
<script language="JavaScript" src="menu_items.js"></script>
<!-- files with geometry and styles structures -->
<script language="JavaScript" src="menu_tpl.js"></script>
<script language="JavaScript">
<!--//
>
>
new menu (MENU_ITEMS, MENU_POS);
//-->
</script>
>
>
Thanks,
Trint
>
Nov 21 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: JesusFreak | last post by:
From: us_traveller@yahoo.com (JesusFreak) Newsgroups: microsoft.public.scripting.jscript Subject: toolbar script problem NNTP-Posting-Host: 192.92.126.136 Recently, I downloaded the following...
2
by: ste33 | last post by:
Hi, I spent the last hour or so trying to find a simple solution to this but with no success. I'd like to have a select box in a form where a user could select "other" if no option is the...
4
by: Dmitry Korolyov [MVP] | last post by:
When we use btnSubmit.Attributes = "javascript: this.disabled=true;" to make the button disabled and prevent users from clicking it again while form data still posting, there is no longer...
7
by: Joseph Scoccimaro | last post by:
Currently I am trying to use JavaScript within greasemonkey to dynamically put a menu at the top of each page. I am running in to trouble when I try to append a node representing a script tag to...
5
by: z | last post by:
I'm using a horizontal CSS-based dropdown menu based on this code: http://www.weblens.org/templates/sample_menu.html Is there a relatively easy way to add a slight delay to the menu with...
1
by: trint | last post by:
How can I add javascript to my code view of my default.aspx file and get my meny to show? Here is the code I want to display (it's obviously a menu): <!-- menu script itself. you should not...
5
by: Jonathan | last post by:
Hello All, I am in the process of creating a 2/3 level collapsible/exspanible menu (called "nav") where users can click on a category and have the submenus appear beneath it and so on (allow...
8
by: Jason | last post by:
Hello, I am trying to utilitze the AJAX Control toolkit in my asp.net project. I have added a reference to AjaxControlToolkit.dll, and in my page, added these lines of code: ...
10
by: AC | last post by:
I had a page that does some event setup on window.onload: function prepEvents() { document.getElementById("menumap_sales").onmouseover = swapMenuSales; // etc } window.onload = prepEvents;
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.