rachelason
Programmer
HI! I am looking for some on user interface form
I have a page where there are two form, When i type in one form say the other form field get filled up automatically. I can do that easily, but when i try to delete a letter from the text box, it wouldn't delete it , any suggestion. this is the code.
<form name="f1">
<input type="text" name="name1" onkeypress="enteringvalue(f2.name2);">
</form>
<form name="f2">
<input type="text" name="name2"></form>
Script:
function enteringvalue(t2){
t2.value += String.fromCharCode(event.keyCode);
}
If i use onkeydown or onkeyup, it registers the event(delete event), but doesn't delete the letter and displays funny character for shift etc.
Has anyone done this kind of work before?
Thanks in advance
I have a page where there are two form, When i type in one form say the other form field get filled up automatically. I can do that easily, but when i try to delete a letter from the text box, it wouldn't delete it , any suggestion. this is the code.
<form name="f1">
<input type="text" name="name1" onkeypress="enteringvalue(f2.name2);">
</form>
<form name="f2">
<input type="text" name="name2"></form>
Script:
function enteringvalue(t2){
t2.value += String.fromCharCode(event.keyCode);
}
If i use onkeydown or onkeyup, it registers the event(delete event), but doesn't delete the letter and displays funny character for shift etc.
Has anyone done this kind of work before?
Thanks in advance