Results 1 to 4 of 4

Thread: How to move a javascript menu in a web page

  1. #1
    Join Date
    Jun 2007
    Thanked 0 Times in 0 Posts

    Default How to move a javascript menu in a web page

    1) Script Title:
    A friend gave me a horizontal menu script coming from your website. I looked for it but did not find it. Anyway, i think that my problem is not directly connected to the script in question. It's more a question on how to use a script in a HTML page.

    2) Script URL (on DD):
    See point 1

    3) Describe problem:
    I have in fact two problems:
    1- Error message in web page
    As indicated before, i use a horizontal menu bar given by a friend. I know it's your site since there is a link in the js code referring you. When i start the menu directly from your html page given in example, it works fine. Here is the code(take note that i removed the comments to save space):

    <title>DHTML Menu Sample</title>
    <body bgcolor=white>
    <SCRIPT language=JavaScript>
    <SCRIPT language=JavaScript src="menu_array.js" type=text/javascript></SCRIPT>
    <SCRIPT language=JavaScript src="mmenu.js" type=text/javascript></SCRIPT>


    When i copy this code and place it in my web page. I have this error message appearing:
    It says that i have a ")" missing on the exact line where the line <SCRIPT language=JavaScript src="mmenu.js" type=text/javascript></SCRIPT> ends.
    My web page still works fines but i see the error image on the lower left and it annoys me. If i put the ")" i still have the error message. As you see, it's not dramatic but i would like to understand why it happens.

    2- How to move a javascript menu in a web page
    My other problem is more serious. I have modified my horizontal menu and it truly looks great. I have only one thing to do: Place where it should belong, between two tables (hope it's to good english word). Right now i see it only on top of the screen.
    When i copy the code shown earlier in the <head> or <body> section it works fine. But when i place the <script> command shown earlier in this block: <tr>
    <td width="800" height="20" valign="top"> SCRIPT COMMAND PLACED HERE

    It does not work at all. Is it because javascript cannot start in <tr> and/or <td> blocks?. If its the case, how can i tell him to start from there?

    I have looked too in the js file where i can see the variables on how to personnalise the menu. I can see that i can change color, choose height, width etc... but it does not seem to have any command to say how to place a menu in a table for example.

    Hope my post in not too confusing,
    I'm still a beginner in web design.


  2. #2
    Join Date
    Mar 2007
    Thanked 0 Times in 0 Posts


    Well first you have not put in " in the code:
    <SCRIPT language=JavaScript src="mmenu.js" type=text/javascript></SCRIPT>
    I think it should be:
    <SCRIPT language="JavaScript" src="mmenu.js" type="text/javascript"></SCRIPT>
    I don't no whether it affects the script but try that...

  3. #3
    Join Date
    Feb 2006
    Thanked 3 Times in 3 Posts


    FYI, you are using the OmniSlide Menu, and can be found here:

    The Dynamic Drive page has a link to a basic menu set-up (demo.htm), and you can play around with that to customize it to your liking, then import it into your page. Hope this helps.

  4. #4
    Join Date
    Nov 2007
    Thanked 0 Times in 0 Posts


    Strangeplant is right and I am using the menu for a customer's project and so far they are very happy with it! One question to you guys though, and I ask because I am faily new to JavaScript, can I set up a dropdown menu inside the js? And would I do a new function/variable?


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts