Textarea w/character counter problem

Hi!
We use a textarea with character counter and limited its max width to 500 chars. If max 500 chars have been inserted, then input stops after 500 chars. That works fine in MS Internet Explorer. Even if you insert CR/LF inputs (ENTER button), the max number of typed in chars will not exceed 500. Using Mozilla Firefox, it is possible to insert many CR/LF, which increases the typed in number by 2. Thus you get e.g. "548 of 500" displayed beyond the textarea. After updating the page in IExplorer even here you get the same counter status displayed. As long as you do not type in the textarea field, the char counter remains as it is and the data can be submitted and finally stored in database.
Qu: Has anybody experienced teh same problem with max chars and CR/LF. Any idea of a workaround prevent "548 of 500" in textareas when typing in CR/LF ?
Br,
Thomas

The CharCount() function that is used by APEX should be updated to contain javascript code similar to the code described here:
http://pikasoftware.com/docs/index.php/Validating_TextArea

Similar Messages

  • Textare with character counter versus textarea with html editor

    Hi
    I am using a textarea with html editor. I need to restrict the user to not type more than 25000 characters? Can someone tell me as to how I can do that?
    I know that one can set the maximum width for textarea with character counter and it prevents one from typing in more than the maximun specified, but I really need to use the html editor. Thanks.
    suni

    This is caused by the charCount javascript function, which dynamically sets the text colour to 'red' when the maximum number of characters is entered, but "resets" it to 'black'.
    Guess the way to avoid this is to create your own equivalent of the charCount function that captures the actual colour from the DOM and attach it to a textarea using the onchange and onkeyup attributes used in the built-in one.

  • APEX_ITEM.textarea with character count in a SQL Report

    This seems like a simple question but where is the function to have APEX draw the textarea but with a maximum number of characters from within a SQL report.
    I am building a parameter entry form but the number of parameters is dynamic so my best option was to use a SQL based report. I have looked though the APEX_ITEM package and found the textarea function but there is no options to draw the version of it that limits character count. Is there a way to have it draw that textarea instead of the unlimited one. In my case I have a length limit that I must enforce.

    The only solution that comes to my mind is to use Javascript. Define a JS function in page header that will check the length of text in textarea and if it exceeds the limit then it will trim it.
    Then, when creating textareas using APEX_ITEM add paramater onChange="callToYourJSFunction()"

  • Character Count Variable

    Hi,
    Is it possible to set the 'chacters remaining' as a variable for Text area with c/count, this is because I have a comments field that is adding to a column that is already populated so the characters remaining will vary depending on what is already in the table
    I know its set in the max width of the elemant section but you cant seem to put a variable name in there.
    Thanks ANDY

    hey andy--
    you can't currently refer to session state values from the maxWidth field as you're finding. i've logged that as an issue, but you can work out your "characters remaining" request for now by calling our charCount jscript function from somewhere you can reference session state. to do so, take a look at the html that's generated when you use those "Textarea w/Character Counter" item types. you'll see that the form element has a jscript call in it that looks something like...
    onKeyUp="javascript:charCount('P3_MY_TEXAREA',255,'tAreaCtr8','tAreaMax8','theBlock8');" onChange="javascript:charCount('P3_MY_TEXAREA',255,'tAreaCtr8','tAreaMax8','theBlock8');"
    ...and you'll see a div and span combo right after it that looks something like this...
    <div style="font-size:8pt;visibility:hidden;" id="theBlock8"><span id="tAreaCtr8"></span> of <span id="tAreaMax8"></span></div>
    ...so you could put code similar to this into a regular TextArea item to call our charCount function while passing it the dynamic value. to do so, you'd put your div/span combo in the "Post Element Text" section of your TextArea item. you'd then want to call charCount by passing it the dynamic value. unfortunately, you can't just put that call into the "HTML Form Element Attributes" because that field currently doesn't support session state references. instead, you'd have to put in a call to a function of yours that calls our charCount. so a call like this...
    onKeyUp="javascript:callCount();" onChange="javascript:callCount();"
    ...just worked in my test case. i defined my callCount funtion in the "HTML Header" field of the page-level atttributes screen as...
    <script language="JavaScript1.1" type="text/javascript">
    function callCount(){   
    charCount('P3_MY_TEXAREA',&P3_X.,'tAreaCtr8','tAreaMax8','theBlock8');
    </script>
    ...and, as you can see, it just calls callCount while passing it my dynamic P3_X value instead of the fixed maxWidth one. having said all this, it's still our recommendation to not directly call the javascript functions that ship with htmldb. we reserve the right to change how those "internal" calls are implemented. to play it absolutely safe, you'd be better off to copy our charCount function into your app (presumably in a .js file) and call that copy using the same work around i specified above.
    hope this helps,
    raj

  • Textarea character count feature quirk/bug

    Apex 4.1.1.00.23
    I've found a quirky thing about the textarea page item. The character count feature counts carriage-return-line-feed (CRLF) as one character, as you would expect it to, but it's stored as two characters in the database because of the way Windows handles new lines.
    So, aside from using clob columns or explaining to users how Windows handles CRLF characters, any thoughts on how one might manage this quirk?

    >
    Please update your forum profile with a real handle instead of "970995".
    Apex 4.1.1.00.23
    I've found a quirky thing about the textarea page item. The character count feature counts carriage-return-line-feed (CRLF) as one character, as you would expect it to, but it's stored as two characters in the database because of the way Windows handles new lines.
    So, aside from using clob columns or explaining to users how Windows handles CRLF characters, any thoughts on how one might manage this quirk?Assuming the problem is ORA-06502 when the counter shows less than the expected limit, but CR/LF pairs actually push it over?
    Create a Post-Submit Computation on the item that replaces CR/LF with LF...
    replace(:p1_text_area, chr(13) || chr(10), chr(10))

  • Spry textarea character count not working in IE9

    Hi.
    I'm using DW CS5 for a ColdFusion form with a textarea field. The spry character count works in every browser but IE9. Anyone know how to fix this?
    Thanks!

    This feature will not work in IE9 and IE10.
    The problem is two-fold
    a) The Copyright notice shows 2006 as the last Spry update. This was around the time of IE7
    b) Microsoft tends to go off on a tangent where every release of IE behaves differently
    As always, we are in the hands of the Adobes and Microsofts.

  • Character count display problem in IE

    Hi all,
    I have implemented a character counter in ADF using Javascript (referencing this http://www.oracle.com/technetwork/developer-tools/adf/learnmore/10-char-input-counter-169133.pdf).
    The problem that I am facing is: when my character counter becomes 0 (can no longer enter any text, the maxlimit of the input field is reached) then on IE browsers, it does not show the character '0'. It displays a blank. On Firefox and Chrome, however, the UI gets displayed as expected i.e. 0 characters left.
    Let me know how to fix this on IE. Have tested with IE versions 8,9. JDev version is 11.1.1.7.0.
    Thanks,
    Anu.

    Hi,
    debugging the JavaScript to see what the value of the variable really is is a good start. If it turns out that it is becoming null, then you could use a if() case in that whenever the value is null you set it to 0. If the value however is correct but just doesn't render then you can try and transform it to a character instead of a number to see if the numeric output is the problem. This is how I would address the problem
    Frank

  • A character counter in a TextArea

    Our friend Mário is requesting the following:
    "I would like to create a character counter in a TextArea with real time actualization, I only could do it after call an action (button), I would like that this happens in real time with the user typing and the counter being refreshed automatically."
    If somebody can help him, please post.
    Marcelo

    Hi Mario,
    what u would like is a Javascript function which monitors whitespaces and determines to add a counter for each line on the enter key
    it would be activated onclick and on change of the control
    with respect,
    amit

  • Report TEXTAREA character counter

    A textarea field has a "Maximum Width" and a Character Counter.
    How can I create Character Counter for a textarea field in a report (SQL Query (updateable report))?
    Edited by: Rob-9100-NL on 28-jun-2012 4:13

    Denes,
    My little bit different function: (one parameter less and no longer extra field for length in the select):
    function f_set_counter(pConterID,pTextId,pMaxLength)
        var pLength = $x(pTextId).innerHTML.length;
        if (pLength>pMaxLength)
         {alert('Dit veld mag niet meer dan '+pMaxLength+' tekens bevatten.')
          $x(pTextId).value=$x(pBron).value.substring(0,pMaxLength)
          {$x(pConterID).innerHTML = pMaxLength}
        else    
         {$x(pConterID).innerHTML = pLength}
    }In the HTML Expression of the text field:
    <textarea id="f06_#ROWNUM#" wrap="VIRTUAL" cols="80"
    rows="5" name="f06" autocomplete="off"
    onkeyup="f_set_counter('f06_#ROWNUM#_CHAR_COUNTER', 'f06_#ROWNUM#',500)"
    #PA_AANTEKENINGEN#</textarea><br/>
    <span id="f06_#ROWNUM#_CHAR_COUNTER"></span>
     van 
    <span>500</span>
    </div>
    <script type="text/javascript">
      f_set_counter('f06_#ROWNUM#_CHAR_COUNTER', 'f06_#ROWNUM#', 500);
    </script>Now I do get the "0 van 500" on a new record.
    Regards,
    Rob
    Edited by: Rob-v-M-Gn-Nl on 26-jul-2012 4:29

  • Problem seeing character count on iPhone 5c

    Even before up-date today, I cannot see the character count on any messages I send whether to another Apple phone or Android. The button is switched on in settings and I've tried restarting phone after turning it on and then off again. Any suggestions please?  Thanks.

    You won't get the character count if sending as an iMessage, only a regular SMS.

  • Character counter does not display data on IE when counter is 0

    Hi,
    I am implementing a character counter in ADF using Javascript (referencing this http://www.oracle.com/technetwork/developer-tools/adf/learnmore/10-char-input-counter-169133.pdf).
    I display the string --> 'x' characters left
    The problem that I am facing is: when my character counter becomes 0 (can no longer enter any text, the maxlimit of the input field is reached) then on IE browsers, it does not show the character '0'. It displays a blank. On Firefox and Chrome, however, the UI gets displayed as expected i.e. 0 characters left.
    Can I get any pointers how to fix this on IE. Have tested with IE versions 7,8,9. JDev version is 11.1.1.5.0
    Here is the code snippet that I am using:
    Javascript:
    function showCharacterCount(event) {
    var keyCodePressed = event.getKeyCode();
    if (keyCodePressed == AdfKeyStroke.TAB_KEY
    || keyCodePressed == AdfKeyStroke.ARROWLEFT_KEY
    || keyCodePressed == AdfKeyStroke.ARROWUP_KEY
    || keyCodePressed == AdfKeyStroke.ARROWRIGHT_KEY
    || keyCodePressed == AdfKeyStroke.ARROWDOWN_KEY) {
    event.cancel();
    else {
    textfield = event.getCurrentTarget();
    textfieldValue = event.getSource().getSubmittedValue();
    textfieldLength = textfieldValue.length;
    textfieldMaxLength = textfield.getMaximumLength();
    o = AdfPage.PAGE.findComponent('characterCounter');
    characterCounterValue = o.getValue();
    characterCounterValue = textfieldMaxLength - textfieldLength;
    o.setValue(characterCounterValue);
    UI:
    <af:panelGroupLayout id="pgl3" layout="horizontal">
    <af:outputText id="characterCounter" clientComponent="true" value="325"
    inlineStyle="text-align:right; display:block; width:100.0px;"
    binding="#{viewScope.myBean.characterCounterBndg}"/>
    <af:outputText value="characters left" id="ot7"
    inlineStyle="padding-left:5.0px;"/>
    </af:panelGroupLayout>
    <af:inputText id="it2" rows="4" columns="53"
    value="#{viewScope.myBean.text}" maximumLength="325" clientComponent="true"
    simple="true">
    <af:clientListener method="showCharacterCount"
    type="keyUp"/>
    </af:inputText>
    Thanks in advance.

    Try converting from dynamic data, that seems to take care of the problem. Also, you could use the regular field point VIs instead of the FP express VI. Check out the attached VI.
    -Alan A.
    Attachments:
    FP_Read.vi ‏30 KB

  • Character counting (count down) in Acrobat

    I have a PDF file with text fields that is going to be used by some of our writers and integrated into presentation decks across multiple programs. We have a lot of it working well and I've been able to piece some bits of code together here and there but I'm no programmer. Where I've hit a roadblock is with adding a visual character counter to the file.
    The file is set up to reflect an actual printed piece where there are limitations on line counts and characters per line. The line counts we aren't as concerned with but having a counter display how many characters you've typed to a line is important. I hope this makes sense. So basically we have one area where you can have a total of 10 lines and 30 characters (including spaces) on each line for a total of 300 characters. What would be great for us is if the text field could have a counter pop up showing something stating that the writer has entered "10 out of 30" characters for the particular line they're on.
    Is this a simple fix or something where I could be pointed somewhere to put a script togeteher? I've tried for a few days now and frankly this is like launching a missle into space for me. I'd greatly appreciate any help/insight you could offer and would be glad to share my expertise on any design or experience issues you may be having.

    Those are all great ideas Max and certainly stuff we can consider for building on this.
    The reason we need to block the characters after a certain count is due to a system this will be entered into. Our client will be copying and pasting the blocks of text into a technology platform that will then print the info. We were given a specific set of instructions for how many characters and lines the printed piece could hold.
    The fun part is that before this goes into production it has to first be presented several times in different presentation decks (some integrated into Powerpoint, others just PDFs). We've tried similar exercises in the past with Word and other programs with not a lot of satisfaction from our client. So, no pun intended, but Acrobat offered the most portable file format to accomplish our needs.
    Though the original code posted above doesn't exactly solve our problem it's a great start for us and gives us somethign to build off of.
    This is a simple one I think. What's the command to add text to a field? So if I wanted to add the character "\n" once the text was full. I guess that would be something like (just a note, not real code)…
    var hardreturn = \n;
    if (max == 25) {
    addText.value = hardreturn;
    (sorry a million times for my horrible programming skills)
    Thanks for everyone's input thus far. This is a great and informative discussion.
    Message was edited by: b.whitham

  • Character count in texting message

    in my apple 4s , iOS 8.0.2, character count not working  when texting messages, while in message setting its already on.
    i try to restart it and  change setting on /off again on and restart but still character not showing when texting message.,
    this is only problem does when upgrade iOS 8.02, before in my old software it was working well .
    kindly help me to solve this problem.
    thanks

    Thank you Malcolm, that was a good idea ... it seems to have improved the text in the messages I;ve received and a slight improvement in the white-on-green of the snet messages. 
    Sadly did not affect the character count.
    I fear it begins to look as if the character count has been overlooked by the designers at Apple and is left "outside" the range of things affected by the accessibility options. What do you think?

  • Nokia 7210 Supernova, sms character counting doesn...

    So, here's the problem.
    At first, when I started typing sms messages, I did see the character counter at the top of the screen. And now, it somehow disappered. I haven't changed any settings or anything...
    Can somebody help me? 

    why my nokia 7210 supernova restart automatically when turning on?
    can somebody help me?

  • Anyone notice character count when using foreign letters?

    Character count is typically 160 max when typing SMS, EXCEPT if you use one of the international keyboards (which I use a lot). I was just typing in Portuguese, and the character count dropped to 70 max. I had been writing to a Brazilian friend and she says my messages are getting chopped up, probably because of this limitation. Anyone else have this problem and/or know if there's anything I can do about it?

    SMSs using foreign characters use UTF-8 (8-bit) text encoding, rather than Latin character SMS which use ASCII (7-bit) text encoding.
    It's not a problem as such, and applies to all phones. It's just a limitation of the encoding used for foreign characters. Foreign characters simply use up more space.
    There's nothing you can do about it.
    See here for more info: http://www.mediaburst.co.uk/blog/the-gsm-character-set/

Maybe you are looking for

  • Test in a LinkedList...

    if there is a way to know if my LinkedList is empty and the way to display the number of element(in this case "0"). If you know how to code it could you show me the way... thanks

  • Saving a PDF from a site

    Hello, When I save a PDF from the web and click "Save As", there is a line in the box that says "save to online account". There is no option to remove that (check box etc.).  Does this mean that my files are being saved somewhere online?  I do not wa

  • User or group does not exists.

    Hi, I am running an unattented installation of SQL on a server. I run it with the following configuration: ;SQLSERVER2008 Configuration File [SQLSERVER2008] ;************************* CORE ARGUMENTS ************************* ; Specify the Instance ID

  • Appletviewer: java.lang.NoClassDefFoundError: netscape/javascript/JSObject

    When I run the appletviewer: in trying to dedebug what the Java plugin fails to load I get this error: C:\Program Files\Java\jdk1.5.0_01\bin>appletviewer.exe http://www.java.com/en/ java.lang.NoClassDefFoundError: netscape/javascript/JSObject at Java

  • BI Load issue in the transformation/DTP after SP 17

    Hello, After SP 17 applied in our BI system, we are having load issue in one particular transformation/DTP. See below the errors: u2022 Messages for 101 data records saved; request is red acc. to configuration u2022 Thee is no active nametab in the s