summaryrefslogtreecommitdiffstats
path: root/package/webif/files/www/webif.js
diff options
context:
space:
mode:
authorUlf Samuelsson <ulf.samuelsson@atmel.com>2008-03-30 20:40:53 +0000
committerUlf Samuelsson <ulf.samuelsson@atmel.com>2008-03-30 20:40:53 +0000
commit0be9560cb5f49d332f9936f36e0b8677affb5866 (patch)
tree103b4415919fa167af76a9cac2d34921657e893a /package/webif/files/www/webif.js
parent4b45fed00627295ee88632dbf81e020ed96e5860 (diff)
downloadbuildroot-novena-0be9560cb5f49d332f9936f36e0b8677affb5866.tar.gz
buildroot-novena-0be9560cb5f49d332f9936f36e0b8677affb5866.zip
Add webif package
Diffstat (limited to 'package/webif/files/www/webif.js')
-rw-r--r--package/webif/files/www/webif.js33
1 files changed, 33 insertions, 0 deletions
diff --git a/package/webif/files/www/webif.js b/package/webif/files/www/webif.js
new file mode 100644
index 000000000..64d26cd8b
--- /dev/null
+++ b/package/webif/files/www/webif.js
@@ -0,0 +1,33 @@
+function value(name)
+{
+ var item = document.getElementById(name);
+ return (item ? item.value : "");
+}
+function isset(name, val)
+{
+ return (value(name) == val);
+}
+function checked(name)
+{
+ var item = document.getElementById(name);
+ return ((item) && item.checked);
+}
+function hide(name)
+{
+ var item = document.getElementById(name);
+ if (item)
+ item.style.display = 'none';
+}
+function show(name)
+{
+ var item = document.getElementById(name);
+ if (item)
+ item.style.display = '';
+}
+function set_visible(name, value)
+{
+ if (value)
+ show(name)
+ else
+ hide(name)
+}