JavaScript: Disabling text box in the report column cell

Hello

Andi (ATD) helped with formatting of columns in the report, their coloration depending on a value. See:
JavaScript - referring to the value of the report column

Now, I want to add a feature:
If the value is "1" then turn off the text box in the column next, otherwise no. The function is:
function hilite(f1)
{
 var h = document.getElementById(f1);
 var t = h.parentNode;
 while (t.tagName != 'TABLE')
 {
  t = t.parentNode;
 }
 var rows = t.rows;
 var k;
 var i;
 var j;
 var c;
 var headers = t.getElementsByTagName("TH");
// var textarea = t.getElementsByTagName("textarea");
 for (k = 0; k < headers.length; k++)
 {
  if (headers[k].id == f1)
  {
    c = k;
  }
 }
 for (k = 1; k < rows.length; k++)
 {
  i = rows[k].cells[c];
  j = rows[k].cells[c+1];
  if (i.innerHTML == '2')
  {
    i.style.backgroundColor = 'yellow';
    i.style.color = 'white';
    i.style.fontWeight = 'bold';
    i.style.fontSize = '18px';
  }
  if (i.innerHTML == '1')
  {
    i.style.backgroundColor = 'red';
    i.style.color = 'white';
    i.style.fontWeight = 'bold';
    i.style.fontSize = '18px';
    
//  j.style.backgroundColor = 'green';   // testing purpose; colors background green but not textarea
    j.style.visibility = 'hidden';               // works fine but ugly
//  j.disabled = 'true';                        // nothing happens
//  j.firstChild.disabled = 'true';           // does not work
//  j.textarea.disabled = 'true';           // does not work
  }
 }
}
See the object of 'j': I can do the whole cells disappear, but it's ugly. It examines with firebug I thought I should use sth. such as firstChild or textarea, but it does not work. I find always pretty hard to manipulate tables in Apex...

Could someone help with this?
Thank you very much
Roger

Hi Roger,

«"" You're sort of almost here!»»»

The next cell to the right of the one that that you are testing contains a TEXTAREA object. Your variable j accesses it using something like:

j = rows[k].cells[c+1].getElementsByTagName("TEXTAREA")[0];

The problem with the help of the method of visibility you have used will disappear while you applied to the entire purpose of TD, so all the borders will go - this application to the new j allows to hide the textarea rather object only.

Andy

Tags: Database

Similar Questions

  • Create a text box in the right column

    Hello

    I am trying to create a text box in the right column of my site, but it makes its appearance in the foler container and it seems not to be the style of the box I've tried (not very well) at the entrance.

    Thank you

    Alex

    www.newcityexplorer.com

    At line 275 of your HTML code, you have a fence that does not belong.  This closes your container #rightSidebar too soon.

    #rightSidebar

    It is the top of the rightSidebar

    Nancy O.

  • Execution of SQL queries based on user input in the text box on the page of the APEX

    Hello

    I am new to develop in the APEX, and I encountered a problem...

    It is even possible to do such a thing: use the text box to enter a SQL query and then run it on my schema and display the results in the report item? And if the answer is Yes, can someone give me advice on how to do this?

    Thanks in advance.

    In my example, the text is from a file in a text box. The report source is a function returning the SQL query:

    DECLARE
       v_query   VARCHAR2 (4000);
    BEGIN
    v_query := :p91_sql_query;
          RETURN v_query;
    END;
    

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Apress.com/9781430235125
    https://Apex.Oracle.com/pls/Apex/f?p=31517:1
    http://www.Amazon.de/Oracle-Apex-XE-Praxis/DP/3826655494
    -------------------------------------------------------------------

  • Turn off the text box with the value of the checkbox

    Hello people,

    I am trying to activate or disable the text box with the value of the CHECKBOX, I have got the same thing with the BOX of ELECTION, with the javascript as follows: -.

    HEADER HTML
    ----------------------
    < script type = "text/javascript" >
    function disableOnValue (o)
    {
    If (o.value == 'Y')
    {
    document.getElementById('P2_TEXT_BOX1').disabled = false;
    document.getElementById('P2_TEXT_BOX2').disabled = false;
    document.getElementById('P2_TEXT_BOX3').disabled = false;
    }
    on the other
    {
    document.getElementById('P2_TEXT_BOX1').disabled = true;
    document.getElementById('P2_TEXT_BOX2').disabled = true;
    document.getElementById('P2_TEXT_BOX3').disabled = true;
    }
    }
    < /script >
    ---------------------

    under region Source whose Point display is < b > before < /b > foot and sequence is the last sequence of the entire region
    ----------------
    < script type = "text/javascript" >
    If (document.getElementById('P2_RADIO_BUTTON_0').checked is true)
    {disableOnValue (document.getElementById('P2_RADIO_BUTTON_0')) ;}
    on the other
    {disableOnValue (document.getElementById('P2_RADIO_BUTTON_1')) ;}
    < /script >
    ----------------

    and finally, to the title of point RADIO_BUTTON, HTML Form element attributes: -.
    -----------
    OnChange = "JavaScript:disableOnValue (this); »
    ----------

    the thing above works very well with the help of the RADIOBUTTON, but I want to try same thing with the CHECK_BOX I also tried a few changes but did not have any success so if someone help out me even that will be great and appreciated!


    Thank you

    Kind regards
    Kumar

    I also have the following in the Footer region region:

    <script type="text/javascript">
    x($x('P12_CHECKBOX'));
    </script>
    

    This is just to make sure that the items are disabled when the page is loaded, because the checkbox is deactivated

    Andy

  • Why can't put 2 text boxes on the same page?

    I am trying to put 2 text boxes on the same page, but the 2nd box is still empty. However, if I move the 2nd box on the next page, or even on a previous page, the text block appears suddenly.

    Why can't put 2 text boxes on the same page?

    The little thing at the end of this first page must be a page break. Which is just what its supposed to change it to a Frame break or break column if you want to have the text to jump to the next available section.

  • What region in the report column HTML link?

    Dear gurus of the Apex,
    OK, I'll go straight to my question. I have a page to download file with region (conditional) report that comes after the file download process. According to the report that I have a column to remove the file downloaded (column has an image link, the target application, the name of the option: P2_DELETE_ID value: #DOC_ID #). Basically the report picks up just downloaded file ID and allows me to delete the file by having Hiden point Page (P2_DELETE_ID) and before the process of header:
    BEGIN
    REMOVE FROM EBA_ASSET_ORDER_TEMP_DOCS
    WHERE annual =: P2_DELETE_ID;
    END;
    condition: Expression 1 value is not Null, and the value of the Expression 1:
    P2_DELETE_ID
    I and another conditional region (which is HTML) he comes after the file download process as well. The Source region is:
    & lt; div id = "FinalMessage" > & lt; / div >
    & lt; br / >
    & lt; div > & lt; a href = "javascript:confirmFileDelete(htmldb_delete_message,'f?p=&APP_ID.:2:&SESSION.:REMOVE_ID:::P2_DELETE_ID:#DOC_ID#')"; > & lt; "img > src="/i/delete.gif "style =" position: relative; " Top: 1px; ' / > delete the downloaded file & lt; /a >
    & lt; / div >
    where id = "FinalMessage" - is the JS success/error message
    and... href = "javascript:confirmFileDelete--is my real question. So I try to hide my region to report and show only my region HTML where I will be able to this (... href...) link delete file from my table. I am able to dele file using report link colum but my... href... link dosnt want to delete my file, doen't even want to pick up the ID of file. Is there a way where I can link my... href... link to pull the report column?

    Thank you

    NP - now access, so I will have a look

    Andy

  • Check box in the report header

    Hi all.
    I have a simple question, but couldn't find the answer myself.
    I need to create the check box in the report header and clicking on it to check all lines.
    Something like in this example ] of Denes Kubicek.
    And another question: How can I do this in interactive report?

    Thanks for your replies.

    Hello

    Go to the attributes of the report of the report and in the header field, add...

    
    

    Also, make sure THAT SQL the source in your area has a column of the box...

    select
    APEX_ITEM.CHECKBOX(1,COLUMN_HERE) "Check",
    .....
    

    I hope this helps.

    -Chris

  • IPhone 6plus - text box to the lock screen

    Recently, I noticed that my lock screen got a new text box to enter my security PIN. I also see an OK button next to the text box to the lock screen that I did not see after the last update of OS. I did no upgrade of the OS recently and the current version is to 9.3.1 (13E238) (model: MGA82HN / A).

    Is this something normal? I remember that this text box came after I tried to install Citrix Mobile Workstyle to configure my mailbox in the office. Is this a problem? What should I do to restore it to normal screen or Original (without text box and the OK button).

    Try this

    Settings > general > reset > reset all settings

    This custom delete all user data

  • Disable right click in the report viewer

    Hello

    I use report viewer provided with Visual studio 2010.

    I have a created a drill holes in the report, and when I consider the report of the application (not preview mode). on the right by clicking on the links, I get options like (opens the link in a new tab) etc. I need either disable right click inside the report viewer or remove some of the options in the list that is displayed on right click.

    Please give me some solutions to this problem.

    Thank you

    Ganesh Kumar S

    Hello

    Please repost your question in the Forum of Visual Studio 2010.

    Visual Studio 2010 Forums category:

    http://social.msdn.Microsoft.com/forums/en-us/category/VisualStudio

    Concerning

  • I want to add text box to the form

    Hello

    Please help me to add text box to the form

    If the user can enter text

    I added the button with success

    cann't just add textbox

    Thanks gerard

    It works

  • How to use the selection tool to resize a text box? Before I was able to click on the text box with the selection too in order to resize, but now I click on it and it only gives me 'path' or 'anchor' options.

    How to use the selection tool to resize a text box? Before I was able to click on the text box with the selection too in order to resize, but now I click on it and it only gives me 'path' or 'anchor' options.

    Ashley,

    What about window > show the rectangle enclosing (Ctrl / Cmd + Shift + B to toggle)?

  • How to unlock objects in spread? My can´t objects be moved (stand picturesboxes and text boxes), and the control/opt/L command is not available. Anyone know how to do? Maria

    How to unlock objects in spread? My can´t objects be moved (stand picturesboxes and text boxes), and the control/opt/L command is not available. Anyone know how to do? Maria

    Try trashing preferences. See replace your preferences

    And please turn off or remove the autoquote bey email for the answer. Thank you.

  • Insert the value in the TEXT box where the cursor was

    Hi all

    I would like to insert in a text box. at the cursor position (or replace selected text), a text.

    I am using the following script, but I can't get it to work.

    (see  .. http://StackOverflow.com/questions/5889127/insert-value-into-textarea-where-cursor-was )


    Thanks in advance


    Concerning

    Saverio

    =======================================

    My texarea point is P200_AFORMULA

    ========================================

    function insertAt (myField, myValue, startSel, endSel) {}

    If (startSel | startSel == "0") {}

    var startPos = startSel;

    var endPos = endSel;

    myField.val (myField.val (.substring(0, startpos)) + myValue + myField.val () .substring (endPos, myField.val () .length));

    }

    else {}

    myField.val () += myValue;

    }

    }

    the function call

    targetBox var = $("textarea #P200_AFORMULA"), startSel, endSel;

    targetBox.bind ('focusout/focusouthandler()', function() {}

    insertAtCursor (this, "how do you do");

    startSel = this.selectionStart;

    endSel = this.selectionEnd;

    });

    var mytext = 'PARALLEL TEXT';

    insertAt (targetBox mytext, startSel, endSel);

    }

    Jorge,

    I discovered that the problem is due to the command targetBox.bind ('focusout/focusouthandler()', function() {... })
    I tried the following solution work now and it's

    Tanks for your answer

    Saverio cordially

    =================================================================

    function insertAtCursor (myField, myValue) {}

    IE support

    If (document.selection) {}

    myField.focus ();

    Salt = document.selection.createRange ();

    salt. Text = myValue;

    }

    Support MOZILLA/NETSCAPE

    Else if (myField.selectionStart | myField.selectionStart == "0") {}

    startPos = myField.selectionStart var;

    var myField.selectionEnd = endPos;

    myField.value = myField.value.substring (0, startPos)

    + myValue

    + myField.value.substring (endPos, myField.value.length);

    } else {}

    myField.value += myValue;

    }

    }

    the function call

    insertAtCursor (document.getElementById ('P200_AFORMULA'), "TEXT ENTERED");

    }

  • How to set up make-style for the text box in the apex.

    Hi all

    I created a text box in the apex and now I'm changing the font for that text box style and I applied here like this is this correct one or any suggestions on this.
    --
    HTML Form Element Attributes: style="font-family:Arial;font-style:Regular;
    The apparoach is the right one or not.
    {code}
    
    
    Thanks,
    Anoo..                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            

    David wrote:

    I created a text box in the apex and now I'm changing the font for that text box style and I applied here like this is this correct one or any suggestions on this.

    --
    HTML Form Element Attributes: style="font-family:Arial;font-style:Regular;{code}
    The apparoach is the right one or not.
    

    N ° attribute is missing a quote from endpoint, and "Regular" is not a valid value for the http://reference.sitepoint.com/css/font-style">make style property.» Valid values are normal | italic | oblique as shown.

    Also, it is recommended to specify a default value of generic downturn at the end of the specifications of font family :
    {code}
    style = "do-family: Arial, Helvetica, without serif;" make-style: normal; »
    {code}
    (There's really no need to ask such questions icies and waste of time to wait for answers: to bookmark a good reference CSS like Sitepoint link above or the http://www.w3.org/TR/CSS21/#minitoc"> W3C CSS specification and refer to them as needed.")

  • Erratic text box near the border of an image

    Dear members,

    All the world has noticed this problem? Insert a framework anchored with an image (such as a jpeg file) to the inside and then insert a text box and enter text.  If you move the text box in the image, the text begins to jump around as he crosses the edge of the image and won't settle down until the text box is at least 1/8 inch away from the edge of the image.

    Is it possible to eliminate this problem? I tried to send the image back and sending the area of text to the front, but in vain.

    It is the framework 7.2 on Windows XP.

    Yours,

    Michael F

    ========

    What are the properties of evasive on the image?

    Graphics > evasive

Maybe you are looking for

  • HP22-3130na: included Cyberlink software, free or trial?

    My 3130na-HP22 came ready for Cyberlink PowerDirector12, Cyberlink PhotoDirector and Cyberlink Power Media Player 14, are these free versions or trial?

  • WMP11 Burns is no longer my CD.

    People- I keep my current software with all updates. I run Vista Home Premium SP2. Lately when I go to burn a music CD, I get the following error: Windows Media Player could not complete burning because the disc is not compatible with your drive. Try

  • BBM BBM pirate

    Please help me. My ID pirate BB. they change their e-mail address and password. they sent my bad friend spread the message and ask for money transferred using phone credit can someone tell me email address on blackberry customer support. I want to re

  • LDAP connection failed to AD throw Firesight

    Hi all I have a problem to connect to AD when adding a new connection to the LDAP server The error message is as below: Show Detail : Opening connection to LDAP server - servername:389 - administrateur Current TLS Require Cert: 0 binding ldap bind in

  • List of Sync blackBerry Smartphones'able Options?

    Being a newbie to all this that I'm even not sure what search terms to use. I'm looking for a list of organizational programs I can sync with my Blackberry 8530 of US Cellular. I know that I can synchronize MS Outlook Yahoo Google (Gmail, Calendar, c