S
Simon Wigzell
I use onkeypress() within text fields in my forms to chcek certain
characters e.g. allow numbers for a phone number or credit card field. The
code looks at the key pressed and if it is not numberic it posts an alert
and returns false. On everything I have looked at except safari on the mac,
returning false to onkeypress() is enough that the newly typed character
will not appear in the text field. On mac safari it does. Is there no way to
make this concept work on a safari mac? And yes I know there are ways around
it if someone is determined to enter other than numbers in a numeric field
such as copy/paste or just making a copy of the form and removing the
character checking but that isn't the point, its just a convenience in case
the user does type a bad character by mistake, its a nice feature to have.
Thanks.
characters e.g. allow numbers for a phone number or credit card field. The
code looks at the key pressed and if it is not numberic it posts an alert
and returns false. On everything I have looked at except safari on the mac,
returning false to onkeypress() is enough that the newly typed character
will not appear in the text field. On mac safari it does. Is there no way to
make this concept work on a safari mac? And yes I know there are ways around
it if someone is determined to enter other than numbers in a numeric field
such as copy/paste or just making a copy of the form and removing the
character checking but that isn't the point, its just a convenience in case
the user does type a bad character by mistake, its a nice feature to have.
Thanks.