Get all updates of Java4s
Follow Us: Email Newsletter

Java/Jsp-jQuery : Auto Reload Part Of Webpage In Every 5 Seconds

jQuery » On Sep 10, 2012 { 8 Comments } By Sivateja

Hi friend.., let us see how to reload/refresh any part of webpage in N number of  seconds [something like auto refresh Div content of the webpage in a specific time interval], hmm you might seen this type of usage in cricket live score websites :-) hope you are well aware of this, even in Facebook/Twitter too.  I will show you how to implement this using Java/jsp-jQuery API.

Files Required

  • index.jsp
  • reload-window.jsp
  • jquery-1.4.2.min.js

Directory Structure:

Output Screen:

index.jsp

reload-window.jsp

Output Video:

You Might Also Like

  ♦ About Author ♦

Java4s_Author
sivateja@java4s.com
Full Stack( Java/J2EE & UI/UX ) Developer and founder of Java4s - Get It Yourself, A popular Java/J2EE Programming Blog. Sign-up for the Email Newsletter for your daily dose of Java tutorials.

Comments

8 Responses to “Java/Jsp-jQuery : Auto Reload Part Of Webpage In Every 5 Seconds”
  1. paul says:

    this script is very well but i want to make something like that for reload some div in the page; can you help me to do that ?

  2. Java4s says:

    @paul

    Currently we are auto refreshing the div with id#score :-), out title is auto refreshing the part of webpage and i took div, to auto reload. Even you can take span or some thing contains id or class.

  3. eramma rayar says:

    could u please give me solution on display numbers from access database with time delay in jsp and i need to do some calculation like add/sub

  4. csrocks says:

    Hey I tried doing this but it. Isn’t getting refreshed every 1 second….and it’s showing me an error near flower braces of function()…saying dat complete the class body by putting).. What to do

  5. Mahesh says:

    Whenever we are changing a data in database then jsp will automatically show the updated data to user.i mean not to refresh or reload continuousaly when we modify data then only needs to be refreshed. How to do this…please help me

  6. Andy says:

    Thanks for the tutorial. This is what I was looking for.

  7. anand says:

    Auto Reload Part Of Webpage In Every 5 Seconds is not working in IE8 please reply.

  8. susheel says:

    hi
    i m making chat application,so i have opened the two browser i want to communicate with each-other.. whenever m sending the msg one browser to another browser it’s not going so plzzz help me how to make communication one browser to another browser (m using spring mvc) ……and how to refreshing the jsp page…

Name*
Mail*
Website



By posting your answer, you agree to our comments policy.
What would you like to learn today?
Browse these popular technologies
Hibernate spring struts Servlets ajax Log4j jQuery Json Core Java Web Services AngularJs
Most Recent Tutorials
Hibernate_Logo Hibernate Recent Posts Spring_Logo Spring Recent Posts Struts_Logo Struts Recent Posts
Useful Links Current & UpComing Tutorials
Upcoming
  Web Services [ SOAP ], JSP
Contact | About Us | Privacy Policy | Advertise With Us

© 2010 - 2016 Java4s - Get It Yourself.
The content is copyrighted to Sivateja Kandula and may not be reproduced on other websites.