Ok, here is my scenario: I need to input numbers using my handheld
IPAQ. I figured out how to create an online numeric keypad for
inputting numbers into an input field, what I need to know is how I
can have JS switch from one input field to another based on me
clicking in the empty box. Here is my code:
########## Start of code ############### ####
<html>
<head>
<title>${TITLE} </title>
<script>
function inpt(nm)
{
ibox = document.tester .number.value+" "+nm
document.tester .number.value = ibox;
}
</script>
</head>
<body>
<form name="tester" method=post>
<input type=text name="number">
<input type=text name="sales">
<input type=text name="budget">
<table border=1 cellpadding=1 cellspacing=1>
<tr vheight=20>
<td><input type=button value=" 1" onClick="inpt(1 );"></td>
<td><input type=button value=" 2" onClick="inpt(2 )"></td>
<td><input type=button value=" 3" onClick="inpt(3 )"></td>
</tr>
<tr>
<td><input type=button value=" 4" onClick="inpt(4 )"></td>
<td><input type=button value=" 5" onClick="inpt(5 )"></td>
<td><input type=button value=" 6" onClick="inpt(6 )"></td>
</tr>
<tr>
<td><input type=button value=" 7" onClick="inpt(7 )"></td>
<td><input type=button value=" 8" onClick="inpt(8 )"></td>
<td><input type=button value=" 9" onClick="inpt(9 )"></td>
</tr>
<tr>
<td><input type=button value=" 0" onClick="inpt(0 )"></td>
<td colspan=2><inpu t type=reset value="Reset"></td>
</tr>
</table>
</form>
</body>
</html>
########## End of code ############### ####
The above code by default will only input numbers into the "number"
input field. What I would like to do is tell JS to switch the input
to the "sales" or the "budget" field just by me clicking in the box.
I figure I can use the onFocus attribute and tried a few things but no
avail. Any help appreciated.
TIA,
Cranky