Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Refresh/reload only a specific <div>

  1. #1
    Junior Member
    Join Date
    Apr 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Refresh/reload only a specific <div> [Can a mod. delete this thread, completely wrong

    Hello!

    First I would like to say that I'm very new to JavaScript, so perhaps I'm trying to do this the wrong way...

    I have a shopping cart, and when a customer puts a product in the cart, a pop up shows to confirm this. But the problem is that I have a "mini-cart" on the side of the webpage that should show the amount of products and cost, but this minicart doesn't update until one refreshes the page...
    So my question is if it's possible to only update/refresh a certain <div> using JavaScript or perhaps Jquery?

    I have been trying this:
    <script>
    $(function() {
      $("#masterofrefresh").click(function() {
         $("#minicart").load("sidmeny.php")
    	 return false;
    })
    })
    </script>
    and been playing around, but no luck...

    I'm glad for any help I can get

    Regards
    Fredrik H
    Last edited by figge88; April 7th, 2012 at 02:18 PM.


  2. #2
    Member
    Join Date
    Mar 2012
    Location
    United States
    Posts
    118
    My Mood
    Inspired
    Thanks
    1
    Thanked 33 Times in 31 Posts

    Default Re: Refresh/reload only a specific <div>

    This forum is for Java questions not javascript. Read this article to understand how they differ.

  3. #3
    Junior Member
    Join Date
    Apr 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Refresh/reload only a specific <div>

    Oops, sorry, didn't pay enough attention...
    Maybe a moderator can delete this thread, since I can't find out how to...
    Last edited by figge88; April 7th, 2012 at 02:15 PM.

Similar Threads

  1. Reload .properties
    By chinna in forum Java Theory & Questions
    Replies: 3
    Last Post: July 14th, 2011, 01:32 AM
  2. 60FPS refresh loop
    By Joe Moer in forum What's Wrong With My Code?
    Replies: 41
    Last Post: December 6th, 2010, 08:22 AM
  3. JTable refresh with Hibernate
    By Scott.Anthony in forum JDBC & Databases
    Replies: 2
    Last Post: October 12th, 2010, 04:19 AM
  4. [SOLVED] How to reload JInternalFrame
    By chyrl in forum AWT / Java Swing
    Replies: 7
    Last Post: April 6th, 2010, 06:31 AM
  5. GUI - refresh problem
    By Shnkc in forum AWT / Java Swing
    Replies: 5
    Last Post: April 2nd, 2010, 06:11 AM