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

  • Home
  • SEARCH
  • 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 5961193
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:55:51+00:00 2026-05-22T18:55:51+00:00

I am trying to use CodeIgniter and jQuery-ui dialog to create a modal window

  • 0

I am trying to use CodeIgniter and jQuery-ui dialog to create a modal window with form to update user information.

The process should be like:
1. Press a button on a view page.
2. A modal window pops up.
3. Inside the window is a form that a user can fill.
4. If the user filled something before, the information should be shown in corresponding field
5. Click the update button on the modal window to save the changes to database.

Can anyone provide a good sample of this process?

I used ajax to pass the data but it didn’t work when I was trying to update the data to the database. It would be nice if an example of how to pass data from ajax to php and how php handle that.

Thanks,
Milo

  • 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-22T18:55:52+00:00Added an answer on May 22, 2026 at 6:55 pm

    well the jquery bit for post(), get(), ajax() works the same in any measure you would normally use it.. key difference here is with CI you can’t post directly to a file-name file-location due to how it handles the URI requests. That said your post URL would be the similar to how you would access a view file normally otherwise

    ie: /viewName/functionName (how you’ve done it with controllers to view all along. post, get, ajax doesnt have to end in a extension. I wish I had a better example then this but I can’t seem to find one at the moment..

    url = '/home/specialFunction';
    jQuery.get(url, function(data) {
       jQuery("#div2display").html(data);
    });
    

    in the case of the above you notice despite it not being a great example that. you have the url with 2 parameters home and specialFunction

    home in this case is the controller file for home in the control folder for the home file in views the specialFunction is a “public function” within the class that makes the home controller file. similar to that of index() but a separate function all together. Best way I have found to handle it is through .post() and a callback output expected in JSON cause you can form an array of data on the php side json_encode it and echo out that json_encode and then work with that like you would any JSON output. or if your just expecting a sinlge output and not multiples echoing it out is fine but enough of the end run output thats for you to decide with what your comfortable doing currently. Hopefully all around though this gives you some clairity and hopefully it works out for you.

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

Sidebar

Related Questions

I am using Codeigniter and trying to use the jQuery autocomplete with it. I
I am using the framework codeigniter and trying to use jquery for the purpose
I'm trying to write a sign up form using CodeIgniter and want to use
I am trying to learn CodeIgniter to use for a shopping site, but I
and sorry if that question is stupid I'm trying to use javascript with codeigniter
I'm trying to dynamically create a div to show error messages using jquery. I'm
I'm trying to use Codeigniter OpenID library and everything work fine with default configuration
I am trying to use SimpleTest with CodeIgniter, using code supplied by maroonbytes .
How can i create a main page with codeigniter? That page should contain a
Im trying to use the Zend Frameworks ACL library in my code (in codeigniter)

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.