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 8740429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T11:07:46+00:00 2026-06-13T11:07:46+00:00

Currently I’ve a problem with the autocomplete function in jquery mobile ( http://andymatthews.net/code/autocomplete/ ).

  • 0

Currently I’ve a problem with the autocomplete function in jquery mobile ( http://andymatthews.net/code/autocomplete/ ). So if I run the page directly via url, the page and the autocomplete functionality will work without any problems. If I navigate to the page via e.g. a mainmenu with the changepage function, the autocomplete function won’t work!

Can you give me an advice?

My code:

mainmenu:

<li>
    <a id="buttonNewReservation" href="newReservations/newReservation.htm">Neue Reservation</a>
    <script type="text/javascript">
        $.cookie.json = true;
        $('#buttonNewReservation').click(newReservation);

        function newReservation() {
            var session = $.cookie("session");
            if (session != null) {
                $.mobile.changePage("/newReservations/newReservation.htm", 
                       {data:session});
            }
        }   
    </script>
</li>
  • Page with autocomplete: The same code as in http://andymatthews.net/code/autocomplete/search.html

Thanks for your help!

Kind regards, pro

  • 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-06-13T11:07:47+00:00Added an answer on June 13, 2026 at 11:07 am

    You import the autocomplete script in the head tag. As JQM only loads this once (the first page you open) and then dynamically loads the div from the page you want to go to with data-role="page", the head tag from the first page is always used in the pages you redirect to from that page.

    For more information read this page:
    http://jquerymobile.com/test/docs/pages/page-scripting.html (Scripts & styles in the head)

    So you need to add this line:

    <script src="jqm.autoComplete-1.4.3-min.js"></script>
    

    to you page div, like this:

    <div data-role="page" id="mainPage">
        <script src="jqm.autoComplete-1.4.3-min.js"></script>
        <div data-role="header">
        //rest of the code....
    </div>//end of data-role="page"
    

    This way the script will be loaded when JQM pulls in the page using AJAX and it will also be available when you go to the page directly

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

Sidebar

Related Questions

Currently I have this code: <?php echo '<meta name=robots content=noindex>'; $arr = json_decode(file_get_contents(http://media1.clubpenguin.com/play/en/web_service/game_configs/ paper_items.json),true);
Currently I am using Amazon Cloudfront to service static objects on my ASP.Net MVC3
Currently I have a web service running in a tomcat (http:// localhost:8080/myApp/getUsers ). My
Currently I have in my code tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(addCompoundToLabel:)]; My code
Currently I am responsible for a service: To make a Http Get call on
currently I'm developing an app for WP7 but came across a little problem with
Currently I have the same code in each Case statement and sometimes I have
Currently I have the following code to update the NSLevelindicator: [self.headerIndicator selfFloatValue:heightValue] Is there
I am currently running into a problem where an element is coming back from
I would like my Web page http://www.gmarks.org/math_in_e-mail.txt on my Apache 2.2.14 server to display

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.