Results 1 to 5 of 5

Thread: Anyway to switch a page to "all uppercase only"

  1. #1

    Thread Starter
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    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??

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  2. #2

    Thread Starter
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    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???

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  3. #3
    PowerPoster abhijit's Avatar
    Join Date
    Jun 1999
    Location
    Chit Chat Forum.
    Posts
    3,228

    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

  4. #4
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    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
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  5. #5

    Thread Starter
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    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...

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width