|
-
Mar 21st, 2013, 04:19 AM
#1
Anyway to switch a page to "all uppercase only"
I've got a customer with data that is all in uppercase and they would prefer that they not be able to type in lowercase. I've got tons of inputs - any way to switch them all globally - via css? - to be uppercase only??
-
Mar 21st, 2013, 08:39 AM
#2
Re: Anyway to switch a page to "all uppercase only"
Actually - maybe this is just a jQuery live-event wired up to a CSS class.
Any one do this with jQuery??
Do I have to trap input keypress events and modify the key to uppercase???
-
Mar 21st, 2013, 08:49 AM
#3
Re: Anyway to switch a page to "all uppercase only"
There's a text-transform property in CSS. Check if that works for you.
There's a way of doing this with XSLT.
The solution is discussed here.
Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
save a blobFileStreamDataTable To Text Filemy blog
-
Mar 21st, 2013, 09:18 AM
#4
Re: Anyway to switch a page to "all uppercase only"
Yeah, but that works for rendering... not data entry...
I have to admit that's a pretty odd-ball request.
I think you're right, you may have to use some js to capture a change event ucase the entry, then send it back to the input element. The fun part will be making it work smoothly, and getting the cursor back in the right spot - keep in mind they'll be able to click back into the text and start typing... Another option is to use the blur or lost focus event(s) and then caps it at that point. then it doesn't matter if they click back into the middle of the text and type.
-tg
-
Mar 21st, 2013, 09:37 AM
#5
Re: Anyway to switch a page to "all uppercase only"
Wow - needless to say - this is more difficult then it seems. Searched around the internet - even wired up this
Code:
$(document).ready(function() {
.
.
.
$('.acs-input-field').live('keypress', keyPress);
}
.
.
.
function keyPress(event) {
var wesThis = [];
}
I might make it a function of the SAVE operation - since SAVE always refreshes all fields with a new GET from the DB.
As the javascript on the page is making up the JSON to send back to the web method that does the SAVE - I can switch up the case at that time.
oh well...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|