kumquat-buildroot/package/webif/files/www/webif.js
2008-03-30 20:40:53 +00:00

34 lines
563 B
JavaScript

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)
}