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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T14:30:21+00:00 2026-06-02T14:30:21+00:00

I have phonegap and jquery mobile working properly and am trying to add codeigniter

  • 0

I have phonegap and jquery mobile working properly and am trying to add codeigniter into the picture. I’m thinking there might be a few ways of doing this to send/receive data. I’ve searched for such a question and read the codeigniter nettuts tutorial but am still confused to make it work with phonegap.

For an example, to help explain, lets assume I’m trying to receive an array of objects that stores 3 fields, id, articleheadline and article.

Article System -Table fields

id
articleheadling- text
article

$.ajax({
  url: 'http://www.server.com/controllername/method/id',

  success: function( data ) {alert('add to view'); }});

Can i use a .ajax post call to a controller like (http://www.server.com/controllername/method/id) and load it into a div using a json returned var from php to js where the array or objects is added to the view( i.e. screen) or should I have the ajax call return a partial html thats processed on serverside to the view. I’d really appreciate any examples , I’ve also saw an example I think I can use here

<?php

$jsonurl = "http://search.twitter.com/trends.json";
$json = file_get_contents($jsonurl,0,null,null);
$json_output = json_decode($json);

foreach ( $json_output->$articles as $article )
{
    echo "{$article->$articleheadline}\n";
} ?>

the url in the above example is from the original. but if I tried something like that what would that trends.json file look like?

I hope this wasnt too long but I tried my best to split up my questions.
Thanks

  • 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-02T14:30:23+00:00Added an answer on June 2, 2026 at 2:30 pm

    For use with phonegap, I’ve tried this approach:

    Use jQuery Mobile and save mustache templates in your phonegap application. Then use jquermobile to request json data from the controller, and load the response in the mustache template. This will require you to hack the jquery mobile library to support mustache templates and reading/populating template files.

    In the above, your codeigniter application is essentially acting as a REST API that returns a json response, which contains data to load in the mustache template, the template file to load, and any error messages or such to display. The phonegap+jquerymobile setup is dumbed down to handle navigation and page rendering only. Each link the application maps to an api url that jquerymobile calls via ajax automatically.

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

Sidebar

Related Questions

i have created a mobile site with jquery mobile to go into a phonegap
I have some strange scrolling problems with my PhoneGap (using jQuery Mobile) app: I'm
I am developing a Android app using Jquery Mobile/Phonegap. I have the following code
I have an application made by using phonegap 1.5.0 and jquery mobile 1.1.0.... I
I am using PhoneGap, jQuery mobile in Xcode. I have a local xml (data.xml)
I'm using PhoneGap and JQuery Mobile. I'm trying to use custom button icons. I
I am using android 2.2, phonegap 1.3, and jquery-mobile 1.0 I have a list
Created a phonegap application using jQuery Mobile. Everything is working great for the most
I'm diving into writing a mobile app with jQuery Mobile/PhoneGap. I'm using this sample
So I have been working on this phone gap application that uses jquery-mobile. Recently,

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.