Simulating the BackSpace key and some other concerns.... 
Author Message
 Simulating the BackSpace key and some other concerns....


Whatz the best way to simulate a BACKSPACE key? I have a textbox entry for
which if the
user enters a non-numeric data, the validation routine would negate the
non-numeric data
and 'backspace' to the last numeric data entered. I'm using the IsNumeric
function to validate
numeric-only entry on each character as it is keyed in and NOT until the
entire value has been
keyed in......<see below Sub>

Also, the value of the textbox entry is not available when using the
onkeydown or onkeypress
event. Why is that ?

Lastly, would I be right to say that the textbox control on a webpage does
not expose
a hWnd property?

What I'm doing now is:

Sub text_onkeyup

If IsNumeric(Chr(window.event.keyCode)) then
    window.status = "IsNumeric is True"
    window.status = "False"
    window.event.keyCode = 0
    window.event.cancelBubble = True
    window.event.returnValue = False            'BACKSPACE not simulated
End If

End Sub

Mon, 10 Jun 2002 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. How to simulate BACKSPACE?

2. How to simulate shift-tab key as arrow down key

3. Capture backspace key on form's text

4. Ignore Backspace, F5, F10, etc keys

5. Use of Chr$ to get backspace or ASCII code for backspace

6. backspace key

7. enable only numeric and backspace key

8. Backspace key code in VB5

9. Help with the backspace key

10. Backspace Key Problems

11. Need help concerning keys/indexes

12. Need help concerning key press.


Powered by phpBB® Forum Software