button onclick=”increment”
-
Hi !
In my tablepress, i’d like to add in cell B1, an incrementing button wich add 1 at the A1 cell value.In B1 cell, I wrote this in Avanced Editor :
<button onclick=”increment()”>+</button>
<script>
var data = 0;function increment() {
data = data + 1;
document.getElementById(“[table-cell id=6 cell=A1 /]”).innerText = data;
}
</script>
Something is wrong, because A1 doesn’t change :). Is it the celle A1 id ?
Could somebody help me please ?
Sorry for my bad English and my bad code also !
Bets regardsThe page I need help with: [log in to see the link]
- The topic ‘button onclick=”increment”’ is closed to new replies.