diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-10-12 01:34:18 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-10-12 01:34:18 +0000 |
commit | 2a8cbedade6d2d7e7e71e5dbb8c562a84cfe6c80 (patch) | |
tree | 1c4b2060e96fcf4a92f0ab52dbe3894d3797bebd /lib/ui.lib.php | |
parent | 80d226853c000229cdcd3690885aea2116f8e2cc (diff) | |
download | ampache-2a8cbedade6d2d7e7e71e5dbb8c562a84cfe6c80.tar.gz ampache-2a8cbedade6d2d7e7e71e5dbb8c562a84cfe6c80.tar.bz2 ampache-2a8cbedade6d2d7e7e71e5dbb8c562a84cfe6c80.zip |
new rating hotness, has some bugs will continue to hash them out
Diffstat (limited to 'lib/ui.lib.php')
-rw-r--r-- | lib/ui.lib.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/ui.lib.php b/lib/ui.lib.php index 47b6cff9..1834dc35 100644 --- a/lib/ui.lib.php +++ b/lib/ui.lib.php @@ -1353,6 +1353,23 @@ function xml_from_array($array) { } // xml_from_array +/** + * show_ajax_js + * This displays the javascript array definition needed + * For ajax to know what it should be replacing + */ +function show_ajax_js($name,$array) { + + $elements = count($array); + + echo "<script type=\"text/javascript\" language=\"javascript\">\n"; + echo "<!--\n"; + echo "var $name = new Array($elements);\n"; + foreach ($array as $key=>$value) { + echo $name . "[$key] = \"$value\";\n"; + } + echo "-->\n</script>\n"; +} // show_ajax_js ?> |