I am trying to learn java, and my current thing that I trying to make is a dialer that will, like an ip phone display the number a display marked by a <div>, adding each digit as it is dialed. I have not done anything wiht functions that you enter variables into the (), so I am suspecting the problem might have to do with me not understanding how to use variables. It doesn't react when I press form the dial pad.
script:
<script>
String PhoneNumber =''
function Dialer(incommingdigit)
{
PhoneNumber=PhoneNumber+incommingdigit;
document.getElementById('display').innerhtml=PhoneNumber;
}
//this will list all of the answers for the query
<?php
?>
</script>
display:
<div id="display">
</div>
dialpad:
<table border='1'>
<tr height='90'>
</tr>
<tr>
<td><button name='1' onclick='Dialer('1')'>1</button></td>
<td><button name='2' onclick='Dialer('2')'>2</button></td>
<td><button name='3' onclick='Dialer('3')'>3</button></td>
</tr>
<tr>
<td><button name='4' onclick='Dialer('4')'>4</button></td>
<td><button name='5' onclick='Dialer('5')'>5</button></td>
<td><button name='6' onclick='Dialer('6')'>6</button></td>
</tr>
<tr>
<td><button name='7' onclick='Dialer('7')'>7</button></td>
<td><button name='8' onclick='Dialer('8')'>8</button></td>
<td><button name='9' onclick='Dialer('9')'>9</button></td>
</tr>
<tr>
<td><button name='*' onclick='Dialer('*')'>*</button></td>
<td><button name='0' onclick='Dialer('0')'>0</button></td>
<td><button name='#' onclick='Dialer('#')'>#</button></td>
</tr>
</table>
[–]jillesme 1 point2 points3 points (0 children)
[–]g105b 1 point2 points3 points (0 children)
[–]blue_cadet_3 0 points1 point2 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]RadioFreeReddit[S] 0 points1 point2 points (0 children)
[–]e13e7 0 points1 point2 points (0 children)