On 12/20/06, Karl Swedberg <[EMAIL PROTECTED]> wrote:

This wouldn't work for pasting text into the inputs, but for copying it
from the inputs, it just might...

1. have the four inputs initially hidden, and display a single, disabled
text input.
2. on double-click, the single input is hidden, the 4 others are
displayed, and focus is set to the first of the 4 inputs
3. when none of the 4 inputs has focus (or on double-clicking any of them
when in "edit mode"), hide them and display the single, disabled input
again.
4. The single input's value is just a concatenated string of the 4 inputs
and the joiners (- - x). It's updated whenever any of the 4 inputs loses
focus.

Not the most elegant solution, but if a quick hack is needed, maybe it
would do the trick?

--Karl


Yeah, I was thinking along those lines with a few changes...

The two cases (that I can think of) when a user selects input are they:
mouse down & highlight OR Ctrl+A. I could detect the Ctrl+A and create a new
input with the joined inputs and have everything selected, focused,
read-only and then remove the field onBlur. That way it would appear
somewhat more "natural".

As for pasting, there are two options I've thought of:
1) I could detect the Ctrl+V and fire an input prompt asking them to past
their value and then parse it into the fields.
2) Make sure max-length on the first field is 10-12 characters and attach an
onChange event that checks the length of the field and if it's longer than 3
"float" the remaining values across the other fields.

Thoughts?
-js
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to