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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:13:27+00:00 2026-05-28T06:13:27+00:00

There is a left block on my web-page – assume it shows a shopping

  • 0

There is a left block on my web-page – assume it shows a shopping basket. When user clicks the “add to basket” button on any product page, I want to reload my left block (shopping basket) so the new product that has been added by the customer can be seen on the left side of the page without reloading the page.

When customer clicks “add to basket” button, it already puts the product into the basket, that’s not the problem but I cannot make the left block refresh. The code is like:

<script type="text/javascript">
function js_add_to_basket(){
    /* vars from form */
    var book_id = jQuery.trim($('#book_id').attr('value'));

    $.ajax({
        type:'POST',
        url : '<?=base_url().index_page()?>/basket/add_to_basket/'+new Date().getTime(),
        data : $('#add_to_basket').serialize(),
        success: function(q){
            $('#add_to_basket').html(q);
            $("#left_basket").load("*path*\inc_left.php #left_basket");
        }
    }) // end of ajax request
} // end of js_basket
</script>

left_basket is the id of the whole div of the left block. I think the path of the file inc_left.php is coming wrong. Whatever I wrote it there, it didn’t work. The file is in the path of “views/inc/inc_left.php”.

Any idea?

  • 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-28T06:13:28+00:00Added an answer on May 28, 2026 at 6:13 am

    You need a controller method to render the content for left panel, then js can access it with url such as <?=base_url().index_page()?>/basket/content

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

Sidebar

Related Questions

Is there any way to make the text align left and justify as same
Are there any rich editors for WinForms that support right-to-left and can export to
Is there any workaround for the following 1 pixel to the left bug? <!DOCTYPE
When you perform a left join in TSQL (MSSQL SERVER) is there any guarantee
I have got a web page with a lot of components. There are a
I have an HTML table in my web page and there may be many
There will be a thumbnail as a left float, followed by the title and
Is there a way to set the columns to be on the left of
A recent problem* left me wondering whether there is a text editor out there
Is there a way to avoid adding a second LEFT JOIN for the table

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.