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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T14:47:58+00:00 2026-06-14T14:47:58+00:00

I’m developing a mobile app using Dreamweaver CS6 (with PhoneGap ), jQuery Mobile and

  • 0

I’m developing a mobile app using Dreamweaver CS6 (with PhoneGap), jQuery Mobile and JavaScript that will collect user-inputted form data, transform the data into a JSON object and transmit it to a python web service. The purpose of the mobile app is to let users create a food order which is then sent to the restaurant. I wanted to inquire with the SO community on what would be an elegant way of handling the logic of creating the order. Currently, the logic is defined by the JavaScript in the HTML page, example below (truncated for brevity):

JavaScript:

    var burgerType; //defines burger type eg.cheeseburger,hamburger
    var burgerQueue = new Array(); //holds completed burgers

    //detects if cheeseburger
    $("#cheeseburger").click(function() {
        burgerType="cheeseburger";
    });

    //detects if hamburger
    $("#hamburger").click(function() {
        burgerType="hamburger";
    });

HTML:

  <div data-role="content">
    <ul data-role="listview" data-theme="e" id="burgers">
      <li id="cheeseburger"><a href="#toppings">Cheeseburger</a></li>
      <li id="hamburger"><a href="#toppings">Hamburger</a></li>
    </ul>
  </div>

Screenshot: Clicking on a burger takes you to a screen that let’s you choose the toppings, didn’t include it because don’t think it’s relevant.

I realize this is probably a very poor way of handing the logic because if the restaurant menu changes I would have to modify the app, republish it to their respective markets (Play,iTunes, etc), and have users update it. The last thing I’d wanna do is frustrate users by having to constantly update the app due to bugs or changes. I know I could partially separate the logic out of the HTML by using an external javascript library residing in the application directory, but that doesn’t help with the constant update issue. I would’ve made the app link directly to a mobile app page on a web server (so the changes I make are immediately seen without updating the app) but I read on another SO post the Apple gatekeepers don’t publish apps that are basically just a webpage wrapped in an app. I’m looking at the django web framework and thinking it may be what I want, but not sure which is why I’m inquiring with the coding gurus here at SO to get ideas on what I should be doing.

To recap: trying to dynamically generate a user-interface and coding logic using jQuery/JavaScript without frustrating users with constant updates. (Kinda like how jQuery let’s you hotlink to their CDN-hosted libraries). I realize this might be confusing, I’ll clarify any questions asked.

  • 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-14T14:47:59+00:00Added an answer on June 14, 2026 at 2:47 pm

    You can bind a single event to multiple elements:

    $("#burgers").on("click", "a" function() {
        var li = $(this).parent();
        burgerType = li.attr("id");
    
        $.mobile.changePage("#toppings");
        return false;
    });
    

    Then you just need to generate the list elements from data, probably based on an ajax call. For that sort of thing I usually make the ajax call in the background on app startup, and have the previous result of that call saved so that connecting for updates doesn’t slow down app startup.

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

Sidebar

Related Questions

I am reading a book about Javascript and jQuery and using one of the
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a small JavaScript validation script that validates inputs based on Regex. I
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I need a function that will clean a strings' special characters. I do NOT
I am using Paperclip to handle profile photo uploads in my app. They upload
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I used javascript for loading a picture on my website depending on which small

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.