Cfdocument with textarea auto Height

Hi All,
I successfully display the content but let the textarea auto
detect my content lengh, so auto height, not fix rows. Below is the
coding:
But the problem is if i put cfdocument tags, then the pdf
just display rows 2, not auto height.
I tried cfhttp, cannot also.
Any idea on this
Thanks

Hi
In the end, I found out that that code only worked if the page had only one textarea (not my case :-/ ). So I decided to write myself a simpler (though not so bright) solution:
Resizes vertically a textarea based on the size of the text it contains.
NB: Works best with monospaced fonts
function textarea_autoheight(textarea) {
  var c = 0;
  var r = 2;  // (*) IE does not seem to work well with
              // textarea.rows so we need one more empty line at the end
  var t = textarea.value;
  for(var i=0; i<t.length; i++) {
    if (t.substr(i,1) == '\n') {
       c = 0;
      r++;
    else {
      c++;
      if(c >= textarea.cols) { c=0; r++;}
  textarea.rows = r;
Resizes and binds a textarea (or all textareas in the page if the parameter is null)
to the autoheight function above, so they get automatically resized as user enters text
function textarea_activate_autoheight(textarea) {
  if(textarea != null) {
    g_textarea_autoheight(textarea);
    textarea.onkeyup = function() {g_textarea_autoheight(textarea);};
  else {
    var ta_list = document.getElementsByTagName('textarea');
    for(var i=0; i < ta_list.length; i++) g_textarea_activate_autoheight(ta_list);
To use it, just add onload="textarea_activate_autoheight();" to activate it for all the textareas in the page. It seems to work well...
If anyone knows how to fix the bug (*) above, please let me know!
Luis

Similar Messages

  • Row="20" seems to be the maximum for Textarea (auto-height)

    I have a textarea item with text that extends beyond 20 lines. I want the textarea to display all rows. Textarea (auto-height) works fine until the content requires more than 20 rows.
    Is this a limit of Textarea (auto-height)? Any ideas on how to display more than 20 rows.

    Hi
    In the end, I found out that that code only worked if the page had only one textarea (not my case :-/ ). So I decided to write myself a simpler (though not so bright) solution:
    Resizes vertically a textarea based on the size of the text it contains.
    NB: Works best with monospaced fonts
    function textarea_autoheight(textarea) {
      var c = 0;
      var r = 2;  // (*) IE does not seem to work well with
                  // textarea.rows so we need one more empty line at the end
      var t = textarea.value;
      for(var i=0; i<t.length; i++) {
        if (t.substr(i,1) == '\n') {
           c = 0;
          r++;
        else {
          c++;
          if(c >= textarea.cols) { c=0; r++;}
      textarea.rows = r;
    Resizes and binds a textarea (or all textareas in the page if the parameter is null)
    to the autoheight function above, so they get automatically resized as user enters text
    function textarea_activate_autoheight(textarea) {
      if(textarea != null) {
        g_textarea_autoheight(textarea);
        textarea.onkeyup = function() {g_textarea_autoheight(textarea);};
      else {
        var ta_list = document.getElementsByTagName('textarea');
        for(var i=0; i < ta_list.length; i++) g_textarea_activate_autoheight(ta_list);
    To use it, just add onload="textarea_activate_autoheight();" to activate it for all the textareas in the page. It seems to work well...
    If anyone knows how to fix the bug (*) above, please let me know!
    Luis

  • How to make panel collection with auto height in a ADF page

    Hi,
    I developed a page in ADF of version JDev 11.1.1.4.0 where I had a adf table under adf panel collection. Now I want to change the height based on my screen resolution.
    For width I used the styleClass as "AFStretchWidth" but couldnt find any option for auto height for table due to this I can see vertical scroll bar on my page which I want to avoid.
    Even I tired to create a customized styleClass as shown below but its fixed height but not dynamic
    IN CSS FILE :
    .lookUpPagePannelCollection{
    width:98.5% !important;;
    margin-left:5px;
    margin-left:5px;
    height: 15.5em !important;
    I want to use % in height attribute which is not supporting by panel collection, can anyone tell the alternative way or tell me which version of JDev had this option.
    Thanks in advance.

    Hi,
    Set <af:panelCollection> as a child component of <af:panelStretchLayout> and check output.
    Form Tag Documentation
    Geometry Management
    This component can be stretched by a parent layout component that stretches its children. e.g., another panelStretchLayout, panelSplitter.
    This component uses <f:facet name="top">, <f:facet name="bottom">, <f:facet name="start">, <f:facet name="end">, and <f:facet name="center"> to organize content into each stretched panel. The contents of the facet may be stretched except when the height or width of the facet is set to "auto" via the topHeight, bottomHeight, startWidth, or endWidth attributes which would then cause that facet content to use its natural browser height or width. Examples of child components that can be stretched inside of the panelStretchLayout facets include:
    <af:decorativeBox>
    <af:panelAccordion>
    <af:panelBox>
    <af:panelCollection>
    <af:panelGroupLayout layout="scroll">
    <af:panelGroupLayout layout="vertical">
    <af:panelHeader>
    <af:panelSplitter>
    <af:panelStretchLayout>
    <af:panelTabbed>
    <af:region>
    <af:table>
    <af:tree>
    <af:treeTable>
    See
    http://docs.oracle.com/cd/E14571_01/apirefs.1111/e12419/tagdoc/af_panelStretchLayout.html

  • Listview inside Grid with Rowdefinition of height Auto ? and Max Height of 100 not display scrollviewer on load

    <Grid Grid.Column="0" Grid.Row="0" x:Name="grdValues">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" MaxHeight="100"></RowDefinition>
                    <RowDefinition Height="5" ></RowDefinition>
                    <RowDefinition Height="Auto" MaxHeight="100"></RowDefinition>
                    <RowDefinition Height="5" ></RowDefinition>
                    <RowDefinition Height="Auto" MaxHeight="100"></RowDefinition>
                    <RowDefinition Height="Auto" MaxHeight="100"></RowDefinition>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="300"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                    <ListView x:Name="lstGenericList"
                                      Margin="4,0,0,0" Grid.Column="0" Grid.Row="0"
                                        ItemsSource="{Binding Items}"
                                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                                        ScrollViewer.VerticalScrollBarVisibility="Auto">
                        </ListView>
                <GridSplitter  Grid.Row="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" ResizeDirection="Rows"  ResizeBehavior="PreviousAndNext"   Height="5"></GridSplitter>
                <!--<Separator Height="2" Grid.Row="2" />-->
                <ListView x:Name="lstBrandList"
                                      Grid.Column="0" Grid.Row="2" Margin="4,0,0,0"
                                        ItemsSource="{Binding Items}" 
                                        ScrollViewer.HorizontalScrollBarVisibility="Auto"
                                        ScrollViewer.VerticalScrollBarVisibility="Auto"
                          VerticalContentAlignment="Stretch"
                          VirtualizingStackPanel.IsVirtualizing="True" 
                           VirtualizingStackPanel.VirtualizationMode="Recycling">
                    <ListView.ItemContainerStyle>
                        <Style TargetType="{x:Type ListViewItem}">
                            <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
                            <Setter Property="Focusable" Value="false"/>
                        </Style>
                    </ListView.ItemContainerStyle>
                </ListView>
                <GridSplitter  Grid.Row="3" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" ResizeDirection="Rows"  ResizeBehavior="PreviousAndNext"   Height="5"></GridSplitter>
                <!--<Separator Height="2" Grid.Row="2" />-->
                <ListView x:Name="lstBrandListv"
                                      Grid.Column="0" Grid.Row="4" Margin="4,0,0,0"
                                        ItemsSource="{Binding Itemsa}" 
                                        ScrollViewer.HorizontalScrollBarVisibility="Auto"
                                        ScrollViewer.VerticalScrollBarVisibility="Auto">
                </ListView>
            </Grid>

    I should think it is a combination of auto and stretch you have there on the sizing which makes it impossible for anything to work out how big it's supposed to be inside a scrollviewer... in an auto height row.
    EG I would take this off:
    VerticalContentAlignment="Stretch"
    And any other stretches in there.
    See what happens.
    Think about giving the rows some sort of an actual height.
    Hope that helps.
    Technet articles: Uneventful MVVM;
    All my Technet Articles

  • Working with textareas

    How do textareas work? If I create a textarea item with auto-height and enter a bunch of numbers in them like
    1
    2
    3
    4
    how can I access each individual line in this? Would I need to parse out the textarea considering CHR(13)/CHR(10) and all that stuff?
    Or does HTML DB store the textarea contents in a PL/SQL table for easy access?
    Thanks

    I wrote a little parser utility with help from AskTom, hope someone finds this useful
    declare
    n integer;
    l_string varchar2(4000) := translate(orig_string,chr(10) || chr(13) || chr(32)
    || ',' , '@@@@');
    l_element varchar2(100);
    begin
    if (l_string not like '%@')
    then
       l_string := l_string||'@';
    end if;
    loop
        n := instr( l_string, '@' );
        exit when (nvl(n,0) = 0);
        l_element := substr( l_string, 1, n-1 );
        if (trim(l_element) is not null)
        then
         array(array.count+1) := l_element;
        end if;
        l_string := substr(l_string,n+1);
      end loop;
    end;

  • Image width=auto height=auto problems in Internet Explorer

    I thought I was having an issue with my MM_swapimage in Internet explorer but it appears to be my images scale.
    I have my main large image that has a width=auto height=auto which does not appear in Internet Explorer only
    the smaller "thumb" images of varying size have a height=40px width=auto so that the different sizes of thumb images look horizontaly uniform. how do I get the images to work without setting the exact scale for each image?

    once I removed the "auto" setting everything worked just fine, the images came in at the proper pixel size, and the thumb nail images where proportional in size seeing how I had a height set of 40 px the width took care of itself.
    Any Ideas on where I can find a good tutorial on client login and password to access pages with their content?

  • How to make 8MP photos with Superior Auto in Xperia Z1?

    Hi all
    I bought the Xperia Z1 mainly for the camera, but I am not satisfied with the results. In articles like the one linked here, it states that "Sony has wisely set the Z1 to take 8-megapixel oversampled photos by default".
    http://www.theverge.com/2013/9/30/4784014/sony-xperia-z1-review
    Though,in superior auto my Z1 takes photos with 5248 x 3936 = 21 MP!  Could that be a reason for the poor image quality and how could I in that case change this setting without going to manual mode (there I already changed it).
    Thanks in advance for your support!
    Dan.
    Solved!
    Go to Solution.

    Hi again
    I have now first tried clearing the data/cache, but no change. The I repaired the phone (loosing all settings done), but it is still the same. The pictures made with "Superior auto" are of 21MP and around 7MB big.
    I also found a colleague that got her phone at the same time and for her it is the same, i.e. the pictures made with "Superior Auto" are of 21MP and around 7MB big. She had though thought that this is how it was supposed to be.
    So the question remains. Do I need to send the phone for "repair" or is this acutally the way it should be?
    Are there no other users on this forum that could clarify this?
    The way I do it:
    1. Start the carmera app.
    2. Choose "Superior auto" if not already done
    3. Take the picture
    4. Open the picture with "Albums"
    5. "Options" -> "Details"
    6. States"Width: 5248" and "Height: 3936" (i.e. 21MP)
    Is this correct or not?
    Thankful for any answers!
    Dan

  • Making Auto Height Divs, Maintaining Same Width

    Hey on my website I have multiple pages with different heights and I am interested in making two banners, one left and right.
    The Working Code I used is below:
    <div id="left" style="background: url(img/Left.jpg);height: 1500px;width: 150px;float: left;">
    </div>
    <div id="right" style="background: url(img/Right.jpg);height: 1500px;width: 150px;float: right;">
    </div>
    This works correctly but with one problem I have to specify the exact height every single time. If I use auto height this only goes for approx. 100px.
    I would like the banners to go non-stop until they reach the footer.
    Thanks for the help.

    Still not working here is what I did.
    Pasted the following code in my .css document
    #left {
    clear:both;
    background: url(img/Left.jpeg);
    min-height: 610px;
    width: 150px;
    float: left;
    #right {
    clear:both;
    background: url(img/Right.jpeg);
    min-height: 610px;
    width: 150px;
    float: right;
    Pasted the following code in my html document under 'boxcontent'
    <div id="left"></div>
    <div id="right"></div>
    Placed the following .css code in my section called boxcontent
    clear:both;
    Nothing happens at all.

  • Problem with IE displaying height

    (among other things) but i have the following code:
    #top_menu {
    font: bold 12px/70px "Times New Roman", Times, serif;
    background: #818f92;
    /*--box-shadow:  0 10px 30px #000000;
       -moz-box-shadow: 0 10px 30px #000000;
       -webkit-box-shadow:  0 10px 30px #000000;--*/
    height: 70px;
    width: 100%;
    text-align: center;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 300;
    #top_menu  #menu_shed {
    background: url(../images/menu_shed.png) repeat-x center bottom;
    height: 10px;
    width: 100%;
    #top_menu #center_nav {
    width: 800px;
    margin: 0 auto;
    #top_menu #center_nav ul {
    width: 742px;
    margin: 20px auto;
    /*- list.style: none;-*/
    #top_menu #center_nav ul li {
    display: inline;
    margin: 0 28px;
    /*-#top_menu #center_nav ul li a{
    display: block; float: left; height: 33px;
    background-image: url(../images/top_menu.png); text-indent: -9999px;
    color: #FFF; text-decoration: none;
    #top_menu #center_nav ul li a{
    display: inline; float: left; max-height: 33px;                             <---- here is the problem. Safari, Firefox, Chrome, they recognize this, but IE is displaying the image with a 66 height instead. how can i fix this?
    background-image: url(../images/top_menu.png); text-indent: -9999px;
    color: #FFF; text-decoration: none;
    #top_menu #center_nav ul li a.my_colors {
    width: 110px; background-position: 0 0;
    #top_menu #center_nav ul li a.my_colors:hover {
    width: 110px; background-position: 0 -33px;
    #top_menu #center_nav ul li a.my_text {
    width: 160px; background-position: -110px 0;
        #top_menu #center_nav ul li a.my_text:hover {
    width: 160px; background-position: -110px -33px;
    #top_menu #center_nav ul li a.my_photos {
    width: 120px; background-position: -270px 0;
        #top_menu #center_nav ul li a.my_photos:hover {
    width: 120px; background-position: -270px -33px;
    #top_menu #center_nav ul li a.my_faves {
    width: 180px; background-position: -390px 0;
        #top_menu #center_nav ul li a.my_faves:hover {
    width: 180px; background-position: -390px -33px;
    #top_menu #center_nav ul li a.my_poll {
        width: 162px; background-position: -570px 0;
        #top_menu #center_nav li a.my_poll:hover {
        width: 162px; background-position: -570px -33px;

    i tried to put that into my php code:
    <div id="top_menu">
    <div id="center_nav">
            * html div#division {
       height: expression( this.scrollHeight > 33 ? "33px" : "auto" ); /*
    <ul>
    <li><a href="#" class="my_colors">MY COLORS</a></li>
    <li><a href="#" class="my_text">MY TEXT</a></li>
    <li><a href="#" class="my_photos">MY PHOTOS</a></li>
    <li><a href="#" class="my_faves">MY FAVORITES</a></li>
    <li><a href="#" class="my_poll">MY POLL RESULTS</a></li>
    </ul>
    </div>
    but it doesn't work. I am assuming that the particular code only works in HTML specifically, but if there is something that I may put into my CSS or PHP code that might provide the desired effect, please let me know. Or if somehow, the above code works already with php.
    Thank you.

  • I can no longer get my i phone 4 to pair with my autos hand free. the blue tooth on the phone is on and so is the sinc. thanks, cliff

    i can no longer get my i phone to pair with my autos hands free. the blue tooth indicates it is on on my phone and the sinc is also on but neither auto can find a blue tooth device. any help will be appreciated. cliff

    http://support.mozilla.com/en-US/kb/Installing+a+previous+version+of+Firefox
    http://www.mozilla.com/en-US/firefox/all-older.html

  • Tabbed panel with adjustable/variable height based on content

    Is there anyway that you can create a tabbed panel with adjustable/variable height based on content in each tab?

    Abhishek,
    Thanks for your reply, however, it is not working with Muse. I added the Javascript to the head section and adjusted iframe and it displays as a small square in the upper left hand corner, unable to view the whole page.
    Inserted into head section --
    <script type="text/javascript">
       function resizeIframe(obj)
      obj.style.height = 0;
      obj.style.height = obj.contentWindow.document.body.scrollHeight + 'px';
       </script>
    inserted as an html object --
    <iframe name="MycoSmooth" src="http://www.mycosmooth.com" frameborder="0" scrolling="no" id="iframe" onload='javascript:resizeIframe(this);' />
    Below is the result:
    The purpose is to have an independent website run the blogging capabilities, since muse doesn't directly support blogging as of yet.
    Since the site is on a different domain, I am running into cross domain issues and it won't get the height of the page. The methods that apparently work use php and I am unsure how that would work in muse, if at all.

  • Export to Excel: Row Auto Height Removed on Data Connection Refresh

    Hi all,
    When I perform a Data Connection Refresh on an Excel workbook exported from SharePoint it removes the row auto height I had in place, hiding valuable information. This is an additional column I added to perform some calculations.
    Any ideas?
    K.
    Personal Blog: http://thebitsthatbyte.com

    Hi Kelly,
    As I understand, you have a SharePoint list and click export to Excel under List tab. Then the list is exported to Excel spreadsheet.
    Generally speaking, all field column width and height keep in the same size when the list is exported to Excel. In Excel, under PAGE LAYOUT tab > Scale to Fit, make Width and Height to be Automatic and Scale to 100%.
    Then the cell should be good. If there is some column still exceed the width of Excel cell, please right click the cell > Format cells > Alignment > Text control, click Wrap text to increase the cell size to fit the text, or click Shrink to fit
    to shrink the text.
    Regards,
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected] .
    Rebecca Tu
    TechNet Community Support

  • Images with width and height

    There is a way to insert an image inside of the html code
    with width and height already? I mean, now, if I want to insert an
    image at the code, goes only <img src="images/test.gif" /> I
    d like that if I insert an image it goes as: <img
    src="images/canto_topo.gif" width="8" height="29" />
    is possible in dreamwaver to do that?
    Thanks!
    Vismona

    If you insert the image using the "Insert Image" function, DW
    will
    automatically insert the width and height.
    Or, if you'd rather insert them the way you are, in the
    Property Inspector
    on the far left, click the dimensions next to the Image
    field, and DW will
    automatically add (or correct) the width and height.
    Hope that helps,
    Patty Ayers | www.WebDevBiz.com
    Free Articles on the Business of Web Development
    Web Design Contract, Estimate Request Form, Estimate
    Worksheet
    "Vismona" <[email protected]> wrote in
    message
    news:gc60ut$nmv$[email protected]..
    > There is a way to insert an image inside of the html
    code with width and
    > height
    > already? I mean, now, if I want to insert an image at
    the code, goes only
    > <img
    > src="images/test.gif" /> I d like that if I insert an
    image it goes as:
    > <img
    > src="images/canto_topo.gif" width="8" height="29" />
    >
    > is possible in dreamwaver to do that?
    >
    > Thanks!
    > Vismona
    >

  • Advice on creating Answers with different line heights

    Some of my answers have 1 line, some have 2, some even have 3 lines. Any recommendations on configuring my Quiz slide so that the boxes automatically resize?
    Currently, I have two problems:
    1) I need to manually page-layout every slide where one or more of the answers takes more than 1 line. This is taking a while.
    2) I can't use "shuffle answers", because sometimes the 3 line answer is it's original space, and sometimes it's on a a one-line high answer line.
    Any advice?

    I try to avoid long sentences in MCQ but if necessary to have multiple lines (you can also reduce the font size) and I want shuffling this is my work flow:
    select the answer caption with the greatest height
    co-select the other answer captions and in right-click menu choose Aligh, Resize to same height
    increase the height of the surrounding box (surrounds all the answer captions, this can also be done in the Quiz master slide, too bad there are no placeholders for the individual answer captions there)
    move the bottom answer caption as far as necessary (will always use shortcuts like SHIFT-DOWN, CTRL-DOWN, DOWN not to disturb the alignment)
    reselect all the answer captions, right-click menu, Align, Distribute vertically (or use the icons from the Align toolbar of course)
    It is a pity that you cannot apply those style changes to all the MCQ slides, no Apply button in format accordion, no save default style in the top part of the Properties panel of the Answer captions. This means that the process has indeed to be done manually, but at least you can shuffle.
    Lilybiri

  • [svn] 4793: Fix bug SDK-17734 Path with width and height set different than path data has incorrect bounds

    Revision: 4793
    Author: [email protected]
    Date: 2009-02-02 11:20:06 -0800 (Mon, 02 Feb 2009)
    Log Message:
    Fix bug SDK-17734 Path with width and height set different than path data has incorrect bounds
    Fix: When calculating the bounds position we should take into account the implicit scaling factor actualSize/naturalSize. Also did some refactoring, getting rid of the protected method calculateTopLeft.
    QE Notes: None
    Doc Notes: None
    Bugs: SDK-17734
    Reviewer: Ryan
    tests: mustella gumbo/layout/GraphicElement
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-17734
    http://bugs.adobe.com/jira/browse/SDK-17734
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/Ellipse.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/Path.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/GraphicElement.a s

    Thank you so much for replying.
    Yes I have removed and reinstalled WMP.
    I had good results with the PD6 application installed on the default path onto the C: drive with the one exception that if the application was launched by accident and the user data path was not available, the PD6 application would blow away my custom user path registry settings. Now that I know what they are I have made a .reg file to repair my registry to my desired user data paths.
    Installing the application on the removable drive appeared to help prevent me from launching the application by accident and overwriting my registry with default user paths.
    So which is the less of the two evils?
    If the application directory is not available, windows media player still tries to launch the .msi for installing PD6.
    If I install the application to the C: drive but the user data to the removable drive, launching the PD6 application without the user data drive will still corrupt my registry settings for a user data path.
    Both these issues seem like a logical (if not easy) fix that should be done in the PD6 application and installation package. I mean really, cannot anyone tell me why windows media player is checking the PD6 application directory? Why in PD4 did we have an option control for setting the user data path from the PD4 application? Why is this option not in the PD6 application, just the installer?
    I am given a choice during installation to move the user data to another non default location. Why else would this be provided if not to accommodate my kind of request to store the user data into an alternate location other than “My Document”. Certainly Palm is not trying to force the users on how to protect and store their personal data?
    Post relates to: Centro (Verizon)

Maybe you are looking for