[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

clear div 5 seconds after ajax returns value

Posted on 2010-08-26
4
Medium Priority
?
404 Views
Last Modified: 2013-12-13
I am trying to figure out how I can make a div clear all of its information about 5 seconds after it appears..I am running an ajax script and I just want the information it returns to appear for a few seconds then dissapear.
0
Comment
Question by:brad0525
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 82

Accepted Solution

by:
leakim971 earned 2000 total points
ID: 33535961
in your callback function (where you get the answer of your call) use setTimeout : http://www.w3schools.com/jsref/met_win_settimeout.asp

setTimeout("document.getElementById('mydiv').innerHTML = ''",5000);
0
 
LVL 5

Expert Comment

by:amrish80
ID: 33539052
Hi
Use the time out function after the Ajax call...
0
 

Author Closing Comment

by:brad0525
ID: 33626758
Thank for the example
0
 
LVL 82

Expert Comment

by:leakim971
ID: 33626794
You're welcome! Thanks for the points!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The most up-to-date version of this article is on my Blog https://iconoun.com/blog/
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question