BlakeEstep
6 years agoQrew Trainee
Pass value from code page into field
I have a code page made of HTML/Javascript saved as a .html. I have a field button that loads the code. All that is working. What I need help with is getting the final value and placing it into another field (numeric).
I am probably missing something easy but can't figure it out. The code is below.
Code Page: saved as .html
I am probably missing something easy but can't figure it out. The code is below.
Code Page: saved as .html
<form align=center> <input type="button" onclick="decrementValueTen()" value="-10" /> <input type="button" onclick="decrementValueFive()" value="-5" /> <input type="button" onclick="decrementValueOne()" value="-1" /> <input type="text" id="number" value="0"/> <input type="button" onclick="incrementValueOne()" value="+1" /> <input type="button" onclick="incrementValueFive()" value="+5" /> <input type="button" onclick="incrementValueTen()" value="+10" /> <br /> <input type="button" onclick="window.close()" value="Submit" /> </form> <script> var value = parseInt(document.getElementById('number').value, 10); function incrementValueOne() { value++; document.getElementById('number').value = value; } function incrementValueFive() { value = value + 5; document.getElementById('number').value = value; } function incrementValueTen() { value = value + 10; document.getElementById('number').value = value; } function decrementValueOne() { if (value > 1) { value = value - 1; } else { value = 0; } document.getElementById('number').value = value; } function decrementValueFive() { if (value > 5) { value = value - 5; } else { value = 0; } document.getElementById('number').value = value; } function decrementValueTen() { if (value > 10) { value = value - 10; } else { value = 0; } document.getElementById('number').value = value; } </script>
Field Button
"https://pies.quickbase.com/db/bnhwf73ut?a=dbpage&pageID=11"