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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:05:24+00:00 2026-06-15T09:05:24+00:00

I have a home page in which i have two DIVs (left & right).

  • 0

I have a home page in which i have two DIVs (left & right).
in left div i will be having some items. and in right div its details.
(please see the image)

Scenario

here, clicking on an item in the left div, its corresponding details should get loaded.
i have two separate views for the two divs. I am able to load the left view from the controller function.

But I should load the right div based on the item_id of the left div item without any page refresh.

for that I will send item_id via jQuery $.post and get the details_page.

my view of the details page is as fillows

<div class="title"><?php echo $title; ?></div>
<div class="details">
    <div class="author"><?php echo $author; ?></div>
    <div class="pagedata"><?php echo $pagedata; ?></div>
</div>

these PHP variables should get replaced when details page gets loaded.

Please help me in coding the above scenario using jQuery in codeigniter.

  • 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-15T09:05:25+00:00Added an answer on June 15, 2026 at 9:05 am

    In your PHP controller, you need a method that serves the views :

    class Foo extends CI_Controller {
        public function getItem($item) {
            // the view holds the html for the right div
            $this->load->view($item);
        }   
    }
    

    in jquery, you can then fetch the view like this:

    $.get('example.com/foo/getItem/item1', function(resp){
        $('#contentDiv').html(resp);
    }, 'html'); 
    

    You would, of course, call this jquery code snippet everytime a pane on the left div is clicked with the appropriate item name.

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

Sidebar

Related Questions

I have an application built using JSF1.2. I have a home page which has
i have website of application which sells applications online.on the home page i want
We have been given a site xyz.com, in which the home page has images
I have a simple link in a menu <a id=Home href=Amico-Bio-Home-Page></a> to which i
I have a home page with ul li div the div is a square
I have a home page activity that I got from an example, which works
I am going to create two pages. The first page will be home.html On
I am using MVC3, in which I have a page let say Home.cshtml with
I have a wordpress page which has two loops like so... <?php global $post;
A tricky one here. I have styling for two UL's on a page which

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.