,
prada sale 2011
| Back to logs list
70929 2009 年 09 月 20 日 23:33 Reading (loading. ..) Comments (0) Category: Personal Diary
We are in the process of creating web pages to refresh the data often encounter problems in a timely manner,
cheap prada handbags, if the methods used will cause the entire screen flashing to refresh the effect,
prada online, which will reduce the operation of the user satisfaction.
so we need to automatically refresh the data in flash-free way to solve the above problem.
instance to solve the problem:
hope to achieve after the user into the system (within the session's time),
prada handbags 2011, if you receive new messages are sent voice prompts.
implementation ideas:
1. First part: <body onload =
2.js part: partial refresh the page with XMLHTTP implementation,
prada outlet, call check_mail.jsp judge on the back-end database to retrieve and return the results. <! -
var xmlhttp = new ActiveXObject (
var checkresult = null;
var username = null;
function init (user) {
username = user;
window.setInterval ('Checkmail ()',
prada sneakers, 5000); / / every 5 seconds automatically call Checkmail ()
}
function Checkmail ()
{
xmlhttp.open (
xmlhttp.onreadystatechange = updatePage;
xmlhttp.send ();
}
function updatePage () {
if (xmlhttp.readyState
checkresult = 0;
}
}
}
/ / -->
3.check_mail.jsp
4. First results show that
the <span id =