2 <script language='javascript' type='text/javascript'>
4 var browser = navigator.appName;
5 if(browser == "Microsoft Internet Explorer") {
6 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
9 xmlhttp = new XMLHttpRequest();
11 url = '/ajax/get_moods.php?user_id=2334';
12 xmlhttp.open("GET", url);
13 xmlhttp.onreadystatechange = function() {
14 if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
15 document.getElementById("ajax").innerHTML = xmlhttp.responseText);
22 <a href='#' onClick='ajax();'>ajax</a>