Web Analytics Made Easy -
StatCounter HTML & Javascript - CodingForum


No announcement yet.

HTML & Javascript

  • Filter
  • Time
  • Show
Clear All
new posts

  • HTML & Javascript

    Hello there,

    How can I make a menu and submenu on js file and I call them from html file?
    Any advice please?

    Thank you!

  • #2
    I don't understand the question. Do you mean a select list which when the user chooses an option then he is directed to another page?

    Have a look at http://www.codingforum.net/javascrip...play-nice.html for an example.

    Quizmaster: Which 1874 Thomas Hardy novel is about Bathsheba Everdene and her three suitors?
    Contestant: The Hound of the Baskervilles.
    Last edited by Philip M; Sep 18, 2016, 10:02 AM.

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.


    • #3
      If you just want a menu navigation system then you don't need JavaScript for that.

      Even if you do use JavaScript the menus would be made in HTML (and still need to work there without JavaScript). The JavaScript would simply make the menu easier to use.
      Learn Modern JavaScript - http://javascriptexample.net/
      Helping others to solve their computer problem at http://www.felgall.com/

      Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.


      • #4
        Sounds like the OP want something like an include file where an edit in one file would result in changes in all files where it’s included. Still, JavaScript is the wrong thing for that.
        Stop solving problems you don’t yet have!