views:

281

answers:

2

I'm refurbishing a simple web-app that our field techs use. One of my goals is to make it Blackberry-friendly, as all of the techs are now using those. This app accepts basic information about a job and stores it. Among that info are times, telephone numbers, and a street address.

I have the time fields and telephone fields figured out with the following CSS:

     input.time  { -wap-input-format: "NN\\:NN"; }
     input.phone { -wap-input-format: "\\(nnn\\)\\ nnn\\-nnnn" }

What I'm trying to do is determine how I can have the phone default to numeric input on an address field, then go alpha once a space has been inserted. I'm assuming that this can't be done with the -wap-input-format property above.

Is there another way--even if it's only for the Blackberry Browser--to do this without resorting to JavaScript? (Not that there's anything wrong with that :-) )

Thanks.

A: 

Have you considered a "Street Number" field followed by a separate "Street Name" field? There is no way to have a variable number of digits at the start of this sort WAP input field without using JavaScript.

Sparr
This seems to be the best way. I wanted to avoid cluttering the interface too much, but usability trumps prettiness any day. Thanks.
willpall
Depending on how you style your text inputs, there's no reason for the two fields to have any more clutter than the vertical separator between them.
Sparr
A: 

I've found that javascript alone is the only way to do a decent job of subtle user input validation. Markup creates more challenges than it solves. With js you can let whatever keystrokes mean whatever you want, customized to any context.

le dorfier