DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Add JavaScript to Asp.Net

  1. #1
    Join Date
    May 2007
    Posts
    843

    Add JavaScript to Asp.Net

    Hello to all, i have create a menu bar using javascript but i don't know how to add them to asp.net.

    I try it with enclose my javascipr code in
    <script language="javascript" type="text/javascript">

    </script> but it doesn't works.

    My JavaScript code:

    fixMozillaZIndex=true; //Fixes Z-Index problem with Mozilla browsers but causes odd scrolling problem, toggle to see if it helps
    _menuCloseDelay=500;
    _menuOpenDelay=150;
    _subOffsetTop=2;
    _subOffsetLeft=-2;


    with(menuStyle=new mm_style()){
    bordercolor="#999999";
    borderstyle="solid";
    borderwidth=1;
    fontfamily="Verdana, Tahoma, Arial";
    fontsize="75%";
    fontstyle="normal";
    headerbgcolor="#ffffff";
    headercolor="#000000";
    offbgcolor="#eeeeee";
    offcolor="#000000";
    onbgcolor="#ddffdd";
    oncolor="#000099";
    outfilter="randomdissolve(duration=0.3)";
    overfilter="Fade(duration=0.2);Alpha(opacity=90);Shadow(color=#777777', Direction=135, Strength=3)";
    padding=4;
    pagebgcolor="#82B6D7";
    pagecolor="black";
    separatorcolor="#999999";
    separatorsize=1;
    subimage="http://img.milonic.com/arrow.gif";
    subimagepadding=2;
    }

    with(milonic=new menuname("Main Menu")){
    alwaysvisible=1;
    orientation="horizontal";
    style=menuStyle;
    aI("text=Home;url=http://www.milonic.com/;");
    aI("showmenu=About US ;text=About Us;");
    aI("showmenu=Product ;text=Product;");
    aI("showmenu=Search ;text=Search;");
    aI("showmenu=Register ;text=Register;");
    }

    with(milonic=new menuname("About US")){
    overflow="scroll";
    style=menuStyle;

    aI("text= Company History ;url= ;")


    }

    with(milonic=new menuname("Product")){
    style=menuStyle;
    aI("text=Product Purchasing Page;url=http://www.milonic.com/cbuy.php;");
    aI("text=Contact Us;url=http://www.milonic.com/contactus.php;");
    aI("text=Newsletter Subscription;url=http://www.milonic.com/newsletter.php;");
    aI("text=FAQ;url=http://www.milonic.com/menufaq.php;");
    aI("text=Discussion Forum;url=http://www.milonic.com/forum/;");
    aI("text=Software License Agreement;url=http://www.milonic.com/license.php;");
    aI("text=Privacy Policy;url=http://www.milonic.com/privacy.php;");
    }

    with(milonic=new menuname("Search")){
    style=menuStyle;
    aI("text=(aq) Web Hosting;url=http://www.a-q.co.uk/;");
    aI("text=WebSmith;url=http://www.softidiom.com/?milonicmenu;");
    aI("text=SMS 2 Email;url=http://www.sms2email.com/;");
    }

    with(milonic=new menuname("Register")){
    style=menuStyle;
    aI("text=Apache Web Server;url=http://www.apache.org/;");
    aI("text=MySQL Database Server;url=http://ww.mysql.com/;");
    aI("text=PHP - Development;url=http://www.php.net/;");
    aI("text=phpBB Web Forum System;url=http://www.phpbb.net/;");
    aI("showmenu=Anti Spam;text=Anti Spam Tools;");
    }


    drawMenus();

    Please help.

    Thanks.

  2. #2
    Join Date
    Sep 2008
    Posts
    86
    where are you putting the "script" tags? normally, they should go in the "head" tag.

Similar Threads

  1. convert my asp pages to asp.net
    By Emad Ramadan in forum ASP.NET
    Replies: 4
    Last Post: 09-30-2008, 07:12 AM
  2. how to pass an array from asp.net to javascript
    By coimbatorian in forum ASP.NET
    Replies: 1
    Last Post: 12-10-2007, 08:51 AM
  3. Replies: 0
    Last Post: 11-15-2007, 07:43 AM
  4. Replies: 5
    Last Post: 05-06-2006, 10:22 PM
  5. add bookmarks with javascript
    By julio aguilera in forum Web
    Replies: 1
    Last Post: 02-15-2001, 07:51 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center