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

Similar Messages

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

  • APEX_ITEM.TEXTAREA - character count limit

    i want to set a character limit on a textarea. my initial thoughts were to use maxlength but sadly that is not available. Has anyone implemented this limit before?

    dan,
    unfortunately i cannot use that as the textarea is part of a report and i being created using apex_item.
    marc,
    thanks for the tip. i had tried to code it using onkeypress but my script was blocking ALL keys when the limit was reached. I didnt want to go down the route of specifying what keys to allow, backspace, delete etc.
    Your link seems to do the trick.
    Craig
    [www.oracleapplicationexpress.com|http://www.oracleapplicationexpress.com]

  • 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()"

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

  • 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

  • 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

  • Character Count Bug? (IDCS4 WinXPSP3)

    Here's a little bug. Apologies if it's been mentioned before.
    The Info palette tells you how many characters your selection contains. If you select the word "hello" the Info p. says: "Characters: 5"
    If you select an entire line that happens to contains a foontnote marker, the character count includes all the characters in the footnote itself. So while an average line might have 70 characters, a line containing a footnote might appear as though it has 1000 characters or more (depending on the length of the footnote).
    Now, as scripters will be aware (and please correct me if I'm wrong), the footnote marker is the parent of the footnote text. So that's probably where the bug comes in.
    But I don't think this should be reflected in the Info palette.
    Thanks,
    Ariel

    Have you reported it? Adobe - Feature Request/Bug Report Form

  • Script that will show the character count of all carriage resturns

    I have found a bug when exporting an indd to idml. If a a carriage return falls in a character count that is a multiple of 8000 + 1 it is converted to a paragraph separator (u2029). I am in the process of mass exporting around 3000 files to idml for a project. I am trying to come up with a way with a script to check the files to see if carriage returns exist in these locations. I am fairly new to scripting and don't know how this would be done. I know it is possible to get character counts but is it possible to check if a character exists in a certain character count from the beginning of a story? Any help on this would be appreciated.
    Also has anyone else ran into this with exporting to idml? I have submitted a bug report. This is can be recreated across multiple computers, OS's and versions of InDesign.

    @Blujely – about your initial question about showing a specific character at an n-th position in a story, you could use a simple GREP search in InDesign and restrict that search to a specific story (e.g. the story of a selected piece of text):
    Search for the n-th position with the formular in dummy-syntax:
    Positive look behind of any character in the exact length n-1 + character
    E.g. if you want to look for a "carriage return", defined in GREP as \n at every 10th position, search for:
    (?<=.{9})\n
    In your case that would be:
    (?<=.{8000})\n
    Uwe

  • 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

  • Charactermode Report - Bold character

    Dear Friend,
    Specification:
    Oracle Reports 5.0
    Default printer file - wide180.prt
    Printing Report in character mode.
    Requirement:
    1. I want to specify the size(pitch) of the
    font in the above printer file.
    2. I wish to print the title in Bold
    Character.
    How to specify these setting in printer file.
    Urgent please.
    If u don't mind, please mail the complete printer file to [email protected]
    Advance Thanks.
    null

    Hi Ranjan,
    You don't have a whole lot of print options with Reports.. you can get what you need to some extent using the
    PRINT-CONTROL option on the REPORT statement. Please check theSAP Help for additional info.
    Check this program also...
    REPORT ZFONT NO STANDARD PAGE HEADING LINE-SIZE 80 LINE-COUNT 65.
    Start of print-control
    NEW-PAGE PRINT ON.
    PRINT-CONTROL FUNCTION 'SF000'.
    WRITE: / 'This is CPI 20'.
    SKIP.
    PRINT-CONTROL FUNCTION 'SF020'.
    WRITE: / 'This is CPI 6'.
    SKIP.
    PRINT-CONTROL FUNCTION 'SF008'.
    WRITE: / 'This is CPI 12'.
    Depending on your SAP printer device, this may also work
    PRINT-CONTROL FONT 1 LPI 6.
    you can try to change font and LPI numbers
    WRITE: / 'font 1 lpi 6'.
    PRINT-CONTROL FONT 2 LPI 6.
    WRITE: / 'font 2 lpi 6'.
    PRINT-CONTROL FONT 3 LPI 6.
    WRITE: / 'font 3 lpi 6'.
    End of print-control
    NEW-PAGE PRINT OFF.
    End of Program
    Cheers,
    Simha.

  • Print landscape report in character mode

    Hi!
    It seems that I should change xxx.prt file in DESFORMAT parameter to match different kinds of printers in order to print landscape report in character mode.
    Our customers are international wide. How can I do to make this setting meet every customer for printing reports in landscape style?
    We will run the reports on Unix on the middle tier and customers read them in browser.
    Thanks for help.
    null

    Hi,
    This sounds like a similar problem that I had (and still having). It was (is) a Bug. Go to metalink.oracle.com and reference this bug#1413754. See if this is your problem as well. My only work around was change the format of the file instead of using character mode I am now using PDF. Which is working fine for me.
    ~Vannette

  • How do I limit the character count in a text field?

    I'm creating a form for co-workers to use when creating web content. I need to restrict their character count for items like headlines, titles, subtitles, etc. Any suggestions on a ready-made form to use out there? And how can I limit those fields so they don't generate content that will then need to be edited down?
    Thanks,
    EAW

    Check out this post:
    http://forums.adobe.com/message/4364378
    Randy

  • How do I found the character count in a document

    How do I find character count and word count in a doumen on my IMc?

    Created with which application?

Maybe you are looking for