We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27449
    • 211 Posts
    Hello,
    I have a menu just js file.
    This is the html file that call all the js files for the menu work:
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

    <head>
    <title></title>

    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />

    <script type="text/javascript" language="javascript" src="sniffer.js"></script>
    <script type="text/javascript" language="javascript1.2" src="custom.js"></script>
    <script type="text/javascript" language="javascript1.2" src="style.js"></script>

    </head>
    <body>
    <script type="text/javascript" language="javascript1.2" src="menu.js"></script>
    </body>
    </html>

    I already put this code in the modx template but doesn’t work.
    How do I do?
      • 27449
      • 211 Posts
      I want create a menu without wayfinder, just the js files.
      How do I do?
        • 25483
        • 741 Posts
        Where did you place the JS files in your modx installation?

        No offense, but can you provide more information in the future when you post a question? Most of the time I see you posting just the question, but not what you did try or what goes wrong. You will get a faster reply to your question if you provide us with more information smiley
          with regards,

          Ronald Lokers
          'Front-end developer' @ h2o Media

          • 27449
          • 211 Posts
          Sorry.

          I have my js files in assets/templates/menu/

          The menu is made with a sequence of js files.
          On the file custom it’s make the style of js, like this:

          addMainItem("http://www.xxxxx.com/","Home",80,"center","","",0,0,"","#7d7d7d","","#ffffff","");
          defineSubmenuProperties(120,"left","center",-4,0,"","","","","","","");

          The other files are a lot of characters that I don’t understand, but are necessary for the menu work
            • 16183
            • 1,390 Posts
            Quote from: sjscosta at Oct 16, 2008, 02:39 PM

            <script type="text/javascript" language="javascript" src="sniffer.js"></script>
            <script type="text/javascript" language="javascript1.2" src="custom.js"></script>
            <script type="text/javascript" language="javascript1.2" src="style.js"></script>

            I have my js files in assets/templates/menu/

            You indicated the wrong path to your js files in the html head.

            Since the js files are in assets/templates/menu/, the relative path (src) should be.....e.g.

            src="assets/templates/menu/style.js"


            do the same for the other two js files

            cheers/k
              • 27449
              • 211 Posts
              I already the correct path, but still is not working.
              The other files I don’t know explain what to do huh
              They are a lot of code that I don’t understand
              I send you the images with the code of sniffer.js and style.js for you can see
                • 16183
                • 1,390 Posts
                A few questions:

                1. Where did you get the menu from? Is there a live example we can see the menu in action or implementation instructions?
                2. Have you tested the menu in a static html file outside modx? Did the menu work then?

                Am no js expert but this looks strange to me: language="javascript1.2"


                /k
                  • 27449
                  • 211 Posts
                  I got the menu in this link:
                  http://www.dynamicdrive.com/dynamicindex1/topmen3/index.htm

                  And I already test the menu in static html and the menu work correctly
                    • 27449
                    • 211 Posts
                    then you meet the solution?
                      • 16183
                      • 1,390 Posts
                      Quote from: sjscosta at Oct 20, 2008, 07:11 AM

                      then you meet the solution?

                      Sorry haven’t found a solution....hopefully someone else will smiley If I have time will try and test it further...