I know its possible, but I haven't been able to get a hold of how to send the parameter as an array or string?
is what I have right now and it will work as long as the element is a single string.
to make this robust, I want to be able to insert an array into both parameters or just 1 parameter... so it would update accordingly
would update 3 elements taking into account the appropriate 3 values and
would update all 3 elements taking into account only 1 value.
would update 1 element with an assortment of values
Code:
function updateHours(el, val)
{
if(el!=null && val!=null)
{
var element = document.getElementById(el);
element.innerHTML = element.value + val;
}
}
to make this robust, I want to be able to insert an array into both parameters or just 1 parameter... so it would update accordingly
Code:
function updateHours("['el1','el2','el3']", "['val1','val2','val3']")
{
}
Code:
function updateHours("['el1','el2','el3']", "val")
{
}
Code:
function updateHours("el", "['val1','val2','val3']")
{
}
Comment