how to add javascript menu.js to usercontrol .ascx

A

AboutJAV

Hi,

I created a navigation menu.js in javascript. It works with .htm
files, however, I can't get it to work in my .master or .ascx file.

I added the following after the <body> tag in the master file.

<script type="text/javascript">var MenuLinkedBy="AllWebMenus
[4]",awmMenuName="topmenu",awmBN="706";awmAltUrl="";</script>
<script src="/JavaScript/topmenu.js" type="text/javascript"></script>
<script type="text/javascript">awmBuildMenu();</script>

When I run the website in debug mode, I do not see the page which uses
my master file.

I thought about adding it to my ascx header control, which occupies my
top portion of the master file.

When I added the 3 script lines to the follow usecontrol ascx file, I
still can't get it to work. Any help is greatly appreaciated.


<%@ Control Language="C#" AutoEventWireup="true"
CodeFile="Header.ascx.cs" Inherits="UserControls_Header" %>
<p align="center">
&nbsp;</p>
<p>

<asp:Table ID="Table1" runat="server" Width="721px"
BorderStyle="None" Height="34px">
<asp:TableRow runat="server">
<asp:TableCell runat="server">
<asp:ImageMap ID="ImageMap2" runat="server" Height="101px"
ImageUrl="~/Images/SiteLogo3.jpg"
Width="141px">
</asp:ImageMap>


</asp:TableCell>

<asp:TableCell runat="server">
<asp:TextBox ID="srchTextBox" runat="server">Search</
asp:TextBox>

</asp:TableCell>
<asp:TableCell runat="server">

<asp:Button ID="goButton" runat="server"
OnClick="goButton_Click" Text="Go" />
</asp:TableCell>

</asp:TableRow>
</asp:Table>
&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp; &nbsp;
</p>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top