Commit | Line | Data |
---|---|---|
b42b2bf9 H |
1 | {literal} |
2 | <script language='javascript' type='text/javascript'> | |
3 | function ajax() { | |
4 | var browser = navigator.appName; | |
5 | if(browser == "Microsoft Internet Explorer") { | |
6 | xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); | |
7 | } | |
8 | else { | |
9 | xmlhttp = new XMLHttpRequest(); | |
10 | } | |
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); | |
16 | } | |
17 | } | |
18 | xmlhttp.send(null); | |
19 | } | |
20 | </script> | |
21 | {/literal} | |
22 | <a href='#' onClick='ajax();'>ajax</a> | |
23 | <div id='ajax'></div> |