Posted on 1998-12-07
Hello all, again,
I am trying to write a simple script that will allow me to display a small keypad of letters. When the user clicks on the letter "A", for example, the "A" will appear in a text box of the form, and will be submitted with the form when the user hits the select button. I do not want to use the "input type=button" option, but would rather like to use my own image for the letter "A" button. I found a script on the Web that is close to what I want, but uses the "input type=button" option. I tried to modify it, but I must be missing something obvious.
The script I have been playing with is as follows:
var letter ='A'
function enter(obj, string)
obj.expr.value += string
<input type="text" name="expr" size=20><p>
<input type="button" value="A" onClick="enter(this.form,letter)">
In the above example, I tried to using both the "input type=button" option, and a "anchor" option (just to see how they both work). The anchor option is what I ultimately want.
The "input type=button" works fine in this example, but the "anchor" option does not work.
Any ideas what I am doing wrong?
Thanks in advance,