diff options
Diffstat (limited to 'package/webif/files/www/webif.js')
-rw-r--r-- | package/webif/files/www/webif.js | 33 |
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) +} |