Keeping inventory in HTML, boo to Excel!
May 19, 2006 3:33 PM
Subscribe
AJAX / DHTML / javascript-filter: If I have an HTML table of numbers, is there a script I can add which would allow me to have a little -/+ button for each cell that would adjust the value of a number in the cell? This is for simple inventory management and would preferably just run as a local HTML file on a Mac OS X machine. (or flash drive)
posted by clango to computers & internet (21 comments total)
<td><span>1</span> <span onclick="change(this,1)">+</span> / <span onclick="change(this,-1)></span></td>
Javascript:
function changeValue(element, value) {
element.parentNode.firstChild.innerHTML = parseInt(element.parentNode.firstChild.innerHTML) + value;
}
posted by Civil_Disobedient at 3:40 PM on May 19, 2006