Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6110365
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:30:27+00:00 2026-05-23T14:30:27+00:00

I am trying to build a kiosk on a local machine only. I’m planning

  • 0

I am trying to build a kiosk on a local machine only. I’m planning to use JavaScript to make the menu lists functional. Here is my html code example.

<ul class="sf-menu">
        <li class="current">
            <a href="#a">Area1</a>
                <ul>
                    <li>
                        <a href="#aa">John's Store </a>
                    </li>
                        <li class="current">
                            <a href="#ab">Katy's store</a>
                                <ul>
                                    <li class="current"><a href="#">Orange</a></li>
                                    <li><a href="#aba">Watermelon</a></li>
                                    <li><a href="#abb">Apple</a></li>

                                </ul>
                        </li>
                        <li>

                            <a href="#">Catherine's Store</a>
                                <ul>
                                    <li><a href="#">Banana</a></li>
                                    <li><a href="#">Pear</a></li>
                                    <li><a href="#">Cherry</a></li>

                                </ul>
                        </li>

                </ul>
        </li>

        <li>
            <a href="#">Area2</a>
                <ul>
                        <li>
                            <a href="#">Peter</a>
                                <ul>
                                    <li><a href="#">Apple</a></li>
                                    <li><a href="#">Rockmelon</a></li>


                                </ul>
                        </li>
                        <li>
                            <a href="#">Lynda</a>
                                <ul>
                                    <li><a href="#">Strawberry</a></li>
                                    <li><a href="#">Jackfruit</a></li>
                                    <li><a href="#">Orange</a></li>

                                </ul>
                        </li>

                    </ul>
            </li> <!--current-->

    </ul> <!--sf-menu-->

The person who is going to update/change the menu(which is going to be massive) is going to use a simple text file eg notepad – .txt (for certain reasons). Is there any way to update the menu items with a simple text file? Can I use a JavaScript or jQuery plugin/code?

Any direction would be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T14:30:27+00:00Added an answer on May 23, 2026 at 2:30 pm

    You can do this using .get:

      var textFile = "SCHEME://DOMAIN/FILENAME.txt";        
      jQuery.get(textFile, function(textFileData) {             
          //Parse file and populate menu based on specs.   
          //textFileData will have the text      
        }         
    

    If you want the text back for each line you can do (assuming the names are separated by a newline):

       var EachLineInTextFile= textFileData.responseText.split("\n");         
       for (var i = 0, len = EachLineInTextFile.length; i < len; i++) 
       { 
         //This will give you each name from here you can put the name where you want it
       } 
    

    A sample would be:

    <script type="text/javascript">
        $(document).ready(function () {
            var textFile = "http://localhost/MyDomain/Menu.txt";
            jQuery.get(textFile, function (textFileData) {
                var EachLineInTextFile = textFileData.responseText.split("\n");
                for (var i = 0, len = EachLineInTextFile.length; i < len; i++) {
                    STORE_TO_REPLACE = EachLineInTextFile[i];
                    //STORE_TO_REPLACE: I would have to the entire format of your file to do this.
                }
            })
        });           
    </script>
    

    From here, if you need help replacing the values in your list take a look at this article

    Or, if you want to replace them all you can use .each to iterate through your list.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to build sslsniff on a RHEL 5.2 system here. When compiling sslsniff on
Trying to build a Metro app using Javascript and having issues with IndexedDb. I
I trying to build an application that is using the torrent technology to make
I trying to build a JavaScript function which will grab a JSON encoded array
trying to build a query from a few tables here, and getting stumped on
I am trying build a jQuery EasyUI datagrid or treegrid out of a large
I was trying Build For Archiving application (from Titanium Mobile) with xCode 4.4, but
I'm trying build a method which returns the shortest path from one node to
I'm trying build an App Engine connected Android application and am having some problems
I'm trying build a MVC framework, but I'm confused about manage themes. Well... I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.