summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-03-18 02:19:58 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-03-18 02:19:58 +0000
commit6e23458ab0bdfd415b2de38a1ad03dbb03644410 (patch)
treea83467b3cc6eb1977b6f680e8200b40bdee1ff3c /modules
parent179b7dab439f4993b6de0f95ef130b1dbf4d4acf (diff)
downloadampache-6e23458ab0bdfd415b2de38a1ad03dbb03644410.tar.gz
ampache-6e23458ab0bdfd415b2de38a1ad03dbb03644410.tar.bz2
ampache-6e23458ab0bdfd415b2de38a1ad03dbb03644410.zip
slight tweak to the hotness added by spocky, added in a slight delay on the onKeyUp removed the alpha list
Diffstat (limited to 'modules')
-rw-r--r--modules/kajax/ajax.js34
1 files changed, 34 insertions, 0 deletions
diff --git a/modules/kajax/ajax.js b/modules/kajax/ajax.js
index 4d7a04b1..2c1461dd 100644
--- a/modules/kajax/ajax.js
+++ b/modules/kajax/ajax.js
@@ -44,7 +44,41 @@ function ajaxPut(url,source) {
http_request.send(null);
}
+// uid is an array of uids that need to be replaced
+function ajaxState(url,input) {
+ var data = document.getElementById(input).value
+
+ var post_data = input + '=' + encodeURI(data);
+
+ var http_request = false;
+ if (window.XMLHttpRequest) { // Mozilla, Safari,...
+ http_request = new XMLHttpRequest();
+ } else if (window.ActiveXObject) { // IE
+ try {
+ http_request = new ActiveXObject("Msxml2.XMLHTTP");
+ } catch (e) {
+ try {
+ http_request = new ActiveXObject("Microsoft.XMLHTTP");
+ } catch (e) {}
+ }
+ }
+ if (!http_request) {
+ return false;
+ }
+ http_request.onreadystatechange = function() { getContents(http_request); };
+ http_request.open('POST', url, true);
+ http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
+ http_request.setRequestHeader("Content-length", post_data.length);
+ http_request.setRequestHeader("Connection", "close");
+ http_request.send(post_data);
+
+} // ajaxState
+
+
+///
+// getContents
+// This is the nitty gritty wait for a good xml document and then decode it
function getContents(http_request) {
// Display the loading doodly