Disable form items

Hi,
I am looking for a way to be able to disable all fields in a page based on a certain condition. I was wondering if there is a simple way to do it or do i have to put a condition on each field in the page?
Regards

Header and Footer > Header Text
<script type="text/javascript">
function disableForm(){
var el = document.forms[0].elements;
var f = document.getElementsByTagName('input');
for(var i=0;i<el.length;i++){
if(el.getAttribute('type')!='button'){
// el[i].setAttribute('style','color:red !important;')
el[i].setAttribute('style','color:black; !important; font-weight:bold; background-color:white;')
// el[i].setAttribute('disabled',true)
el[i].setAttribute('disabled','disabled')
el[i].setAttribute('class','disabled')
</script>
Display Attributes > Cursor Focus
Do not focus cursor
HTML Body Attribute
onLoad="first_field(); disableForm();";
you can create a button and call disableForm(); onclick ...

Similar Messages

  • Disable form item in oracle apex 3.2

    Hi,
    I am new to oracle apex, please help me from this problem.
    I'm having form item called "P805_COMP_ID" as text field , i need disable it always, for the same i fallowed some steps with the refrence of the link https://forums.oracle.com/forums/thread.jspa?threadID=2309731
    Step 1 i have written the jquery
    *<script type="text/javascript">*
    *$(document).ready(function(){*
    hideAdvsearch();
    function DisableItems()
    *$x_disableItem('P805_COMP_ID',true);*
    *</script>*
    Step2 : and i'm calling same function in HTML Form Element Attributes
    onload="DisableItems();"
    but it is not working, please help me,
    Thanks and regards,
    Ibrahim Sayyed.

    Hi Hari,
    I am sory to late respond ,
    The above scenario is working fine , after calling same function in header and footer atribute.
    but it is not working properly if i put condition.
    as per below mentioned code if item value 'P802_INT_COMP_ID' is null then it should disable else it should enable.
    <script language="JavaScript" type="text/javascript">
    $(document).ready(function(){
    hideAdvsearch();
    DisableItems();
    Function DisableItems()
    if ($v('P802_INT_COMP_ID').val== null)
    $x('P802_TEMP_LOG').disabled = true;
    </script>
    Thanks and regards,
    Ibrahim Sayyed.

  • Adobe interactive form : Disabled menu item

    Hi experts,
    we recenlty satred working in Adobe iteractive form in SAP. and we are facing folllowing issues
    1)submenu item is disable (submenu item from "Layout" and "Table" is not enable)
    any solution?

    Hi Sandy,
    Thanks for Replying
    yes i am in display mode but same thing happens when i am in edit mode..
    sorry i can not go in edit mode right now as another developer is working on it.
    SAP Net weaver version - 7.31 with EHP 6.0
    ALD version :  ES2 9.0
    See below Screenshot from other adobe form
    Message was edited by: Zubin ..

  • Disable the Textfield while editing the HTML form item

    How to disable a texfield while editing the HTML form item ? It should be enabled while creating the new form entry / record.
    Yogesh

    Yogesh,
    If you 'disable' an item and submits (UPDATE) the page, then disabled item value won't get submitted. So the disabled item value will get updated with NULL or you will get any validation failures messages, if you have any.
    Better option would be, make the item read-only during Update. For the text item for which you want disable, edit that item,goto 'Read-only Conditions', here set the condition so that user can't edit it during UPDATE. Here you can use same conditions as of your 'UPDATE' button 'display conditions'
    Regards,
    Hari

  • Java Script Disable/Enable Items Problem

    Hi,
    I followed the directions to disable/enable items from http://www.oracle.com/technology/products/database/htmldb/howtos/htmldb_javascript_howto2.html#disable.
    And I'm getting an error.
    I have fields like :
    Issue Summary
    Issue Description
    Identified By
    Identified Date
    Status (Values: Open, On-Hold, In-Process, Closed)
    Priority
    Target Resolution Date
    Whenever the Status changes to 'In-Process' I would like to disable 'Issue Summary and Issue Description'.
    Both the fields (Issue Summary and Issue Description) are being disabled when the Status changed to 'In-Process'
    but when I click the 'Apply Changes' button I'm getting the error: 'Issue summary cannot be null.'
    I do have a Not Null validation on Issue Summary field, but I'm only updating the Status field.
    Following is the JavaScript:
    In the Page Attribute (HTML Header)
    <script language="JavaScript" type="text/javascript">
    <!--
    //htmldb_delete_message='"DELETE_CONFIRM_MSG"';
    //-->
    // This function takes in:
    // 1. A string expression to evaluate. For example:
    // 'document.getElementById(\'P125_STATUS\').value=InProcess'
    // Notice the quotes are escaped using a "\"
    // 2. One or more arguments which are item ID's as strings. For example:
    // ...,'P1_ENAME','P1_SAL'...);
    // Notice the ID's are the item names, NOT item labels
    function disFormItems(testString,P125_ISSUE_SUMMARY,P125_ISSUE_DESCRIPTION){
    theTest = eval(testString);
    if(theTest){
    for(var i=1;i<4;i++){
    if (arguments){
    disItem = document.getElementById(arguments[i]);
    // disItem.style.background = '#cccccc';
    disItem.disabled = true;
    else{
    for(var i=1;i<4;i++){
    if (arguments[i]){
    disItem = document.getElementById(arguments[i]);
    disItem.disabled = false;
    // disItem.style.background = '#ffffff';
    //-->
    </script>
    In the Footer:
    <script language="JavaScript1.1" type="text/javascript">
    disFormItems('document.getElementById(\'P125_STATUS\').value==\'In-Process\'','P125_ISSUE_SUMMARY','P125_ISSUE_DESCRIPTION');
    </script>
    In the Status field HTML Form Element Attributes:
    onChange="javascript:disFormItems('document.getElementById(\'P125_STATUS\').value == \'In-Process\'','P125_ISSUE_SUMMARY','P125_ISSUE_DESCRIPTION');"
    Can somebody let me know what's wrong?
    Any help is greatly appreciated.
    Thanks in advance

    FYI: I used the following JavaScript to make it work:
    In the Header Text
    function SetReadOnly()
    var status = document.forms[0].p_t09.value;
    if(status == 'In-Process')
    document.forms[0].p_t02.readOnly = true;
    document.forms[0].p_t03.readOnly = true;
    //-->
    In the Footer
    <script language="JavaScript1.1" type="text/javascript">
    SetReadOnly();
    </script>
    In the HTML Form Element Attributes
    onChange="javascript:SetReadOnly();"
    Thank you very much for your suggestion

  • How disable an Item

    Hi,
    Thank You to Rosario.
    Now I have a new question.
    In the 'Header' block of my form I have some Items, for example:
    TYPE_CODE Varchar2
    ANA_CODE Varchar2 etc.
    and in 'Control' block a button that execute a query.
    I need, when I push the Run button, disable the Items in the HEADER.
    In the trigger WHEN-BUTTON-PRESSED I have insert a code like this:
    Go_Block('HEADER') ;
    Set_Item_Property('TYPE_CODE',ENABLED,PROPERTY_FALSE) ;
    Set_Item_Property('ANA_CODE',ENABLED,PROPERTY_FALSE) ;
    But when I Run the Form, an error FRM-40105 is returned.
    I think that I mistake the syntax. How can resolve the problem ?
    Best Regards
    Gaetano

    Frm-40105 : unable to resolve reference to item
    You don't need to go to the Header block to run this code but you need to specify the block name in the calls to set_item_property:
    Set_Item_Property('HEADER.TYPE_CODE',ENABLED,PROPERTY_FALSE) ;
    Set_Item_Property('HEADER.ANA_CODE',ENABLED,PROPERTY_FALSE) ;

  • Disable the Item Availability Button based on Order type and Item category

    Hi ,
    My requirement is to disable the Item availability check button in VA01 based on the Order Type & Item category. Is there any user Exits/ Badi / FM available for this.
    Thanks in advance.
    Srinivas.

    Hi,
    Although it is an old post I need to answer for people who search an answer to the same type of question. To hide a field
    you can use transaction variant 'tcode:SHD0'. But it is not based on Order type and Item category. May be you can use
    USEREXIT_FIELD_MODIFICATION form in user-exit MV45AFZZ. You can loop at screen and set screen-active = 0 in fields
    where you want them to be inactive.

  • How to update a report  from a form on the same page when form item changes

    I have a portal form from a table and a portal SQL report with a bind variable on a page. I want the report to get updated with details based upon what was selected from a form item. The form item is a selection from a dynamic LOV. Whenever the form item gets changed, the report should get updated to reflect the change. Can this be done using a javascript ONCHANGE event?
    Oracle Portal Version is 10.1.2.2.0.

    Your applet can open an URLConnection and read directly a document from your webserver.
    public String readText() {
      java.net.HttpURLConnection conn = (java.net.HttpURLConnection)myURL.openConnection(); ...
    }So using JavaScript on your page, you might call readText() to fill that textarea.
    The interesting link you gave, handled the JavaScript/Applet interaction. Test that with just return "Hello";.
    The real programming is more interesting.

  • How do I disable one item in a radio buttons control at run time

    I need to disable one item in a radio buttons control. At design time
    this is possible, but how do I do this at run time? Is this possible? I
    cannot find a property per item

    Use the property "Controls[ ]" - this gives you an array with references of each single button in the radio buttons control. These you can access with property nodes too.
    Hope this helps.
    Using LV8.0
    Don't be afraid to rate a good answer...

  • Getting a form item to load first in target page

    according to ben forta who i met many years ago, cf loads the complete page and then does functions in a particular order. i.e. includes, queries, etc.
    my problem is that i am sending over a unique identifer in the formset that is needed in an include on each page of my cart (i don't use cookies or sessions and don't want to get into that).
    what i want to know is if there is a way to force cf 10 to look at form. items first. the page needs that number or the include (header.cfm) crashes.
    i also have that issue with cfabort where cf does a lot of functions before it recognizes that tag which can really foul up things if a variable isn't there.
    site needs to be pci compliant
    tnx in advance,

    I receive no errors as stated in the original post.
    Eventually the webpage does load, but it takes 2 minutes for anything to start happening.
    During that time, the program is responsive, but displays no errors or status messages.
    This happened in Firefox version 6, as it did for the other poster in this thread.

  • Beginners question - making sense of form, item, pane & variable (with relation to where data is stored in the SQL database)

    Hi Everyone,
    I am new to writing reports (SQL code) for SAP, however I am aware that inside SAP Business One it is necessary to enable System Information (from the View menu) in order to see which tables (and related table attributes / column names) are related to various aspects of the various SAP 'modules' (e.g.: A/R Invoice).
    Using an A/R Invoice as an example I can see at the row (or line) level that an item with the description of 'Opening Balance Transfer' is contained in the table INV1, within the attribute (or column) called Dscription.
    However not every 'on screen object' shows a table / attribute. For example in the same A/R Invoice if I hover my mouse over the Balance Due field all I see is Form related information.
    My question is 'How do I make sense of the Form, Item, Pane, Variable information?', with relation to where data is stored within the SQL database?
    Links to online tutorials explaining how this feature of SAP Business One will be much appreciated, along with any personal advice regarding working with this information.
    Any (and all) help will be greatly appreciated.
    Kind Regards,
    David

    Hi David,
    1.Here I am explaining use of each field except pane
    a. Form ---> Used in additional authorization creator
    b. Item, column--->Useful in creating Formatted search queries (FMS)
    c. Variable --> Some of the field values based on another values. ie. indirect values.
    d. INV1---Table name
    2. How to get variable?
    As per your second attachment, to get balance due ,you need doc total field from OINV table. For example,
    SELECT T0.[DocNum], T0.[DocTotal] FROM OINV T0 WHERE T0.[DocNum] = 612004797
    Thanks & Regards,
    Nagarajan

  • How to identify listeners types for forms, items and events in addon wizard

    Dear users,
    I have developed a sample addon through B1DE wizards and successfully installed and connected the addon and can view menu and form of my addon. Since i am new to this, i didn't add any listeners to my form, items and events because i don't know what type of listeners to add and what coding to add after adding listeners.
    If anyone describe me how to work with listeners, i would be glad. My form has basic fields like BPcode, BPname, Docnum, Itemcode, Item name, quanity, price, total etc. Uptil now my addon form has no function of getting list of BP and Items and calculating the totals based on price and quantity but it has some basic functions like add, update,del, add print view, next record previous, record next etc. which are due to object registration and auto-code generation wizards i think.
    Please help me in adding listeners and their relevant coding.
    Thanks in advance.

    Thanks for reply, Actually I am asking about listeners in the wizard of B1DE, code generator wizard. I think you are telling me about adding listeners directly in the vb.net. Kindly, tell me first, what event type I should add for item, form etc while adding listeners during  the wizard. Or If you know some link where event types of listeners are decribed, you are more than welcome.
    Thanks,
    Farhan

  • How to fetch the value of tabular form item in javascript

    Hello all
    I want to do some calculations on the value entered by the user in the textfield of a tabular form, how can I fetch the value of tabular form item in the javascript?
    I am using normal tabular form, not using apex_item tabular form.
    I can pass the current textfield value to the function using "this" as a parameter, but how can I fetch the value of other rows of that same column?
    Thanks
    Tauceef

    Hi Alistair
    jQuery is still not working, but I got it done through some other means, this is the code:
    function total(pThis){
    var l_Row = html_CascadeUpTill(pThis,'TR');
    var l_Table = l_Row.parentNode;
    var l_Row_next = l_Row;
    var n_rows = l_Table.rows;
    var lInputs;
    var v1;
    var sum = 0.0;
    var temp;
    var i = 0;
    var j = 0;
    //alert(n_rows.length);
    while(j < (n_rows.length - 1))
    temp = 0;
    if(l_Row_next != null){
    lInputs = html_Return_Form_Items(l_Row_next,'TEXT');
    v1 = lInputs[0].value;
    //alert(v1);
    sum = parseFloat(sum) + parseFloat(v1);
    l_Row_next = l_Row_next.nextSibling;
    temp = 1;
    if(temp == 0){
    l_Row_next = l_Table.getElementsByTagName('TR')[1];
    lInputs = html_Return_Form_Items(l_Row_next,'TEXT');
    v1 = lInputs[0].value;
    sum = parseFloat(sum) + parseFloat(v1);
    l_Row_next = l_Row_next.nextSibling;
    j= j+1;
    $x('P78_TOTAL').value= parseFloat(sum);
    I am calling this function onblur event of the textfield.
    Still I am having one problem, I want to perform this calculation on load of the page also, how can I do that? because while calling onblur of the textfield I can pass that textfield to this function but on onLoad how I will pass the textfield to call this function so that I will be able to get the textfield value in the function?
    there may be some rows already existing, so I want the total of the existing rows to be displayed in my P78_TOTAL textfield that is why I need to do this calculation on onLoad of the page.
    Thanks
    Tauceef
    Edited by: Tauceef on Jul 8, 2010 4:57 AM

  • How to hide/disable menu items using Javascript in Acrobat 9 pro or later

    We just wanted to know on how to hide/disable menu items for e.g. 'Open' menu item under 'File' menu in Acrobat 9 or later on Mac using Javascript. It would be useful if you could provide if any other option is in place already.

    Not sure it will work, but you can try using the app.hideMenuItem() method. See reference here.

  • Need to send form item inline of an email

    Hi,
    I need to send an email with a form item that would send REQUEST and submit a note to a database table text column.
    an email with an HTML form w/ submit button..
    Is there a link to a HOW TO ?
    Thank you, Bill

    Hi, Thank you for the link but I already send email in my app....
    I guess the real question is:
    when sending an email from with in the app, how do you build the syntax to have a button with in the email to take the receiver of the email into the app...
    or in the email have a comment textarea and a button
    When the email user clicks the button it sends the textarea to the app and updates it.
    how do you make it so if the request comes from the email you don't need to logon?
    As I typed this I kinda am getting ideas... just to build a form within the email but it is the ? form action line I need to know how HTML_DB needs the syntax to be...
    Clear as mud?
    Thanks Bill

Maybe you are looking for

  • Can I have the same iTunes library on 2 computers?

    I have iTunes on my desktop PC, but now I want to use it on my laptop. I've downloaded iTunes on the laptop, but when I log in to my account, none of my music appears. I have my library backed up on my desktop hard drive, so do I have to import all o

  • Gnome-Shell logs in as Gnome Display Manager

    Hello, My gnome-shell decided to crap out on me after working perfectly for the past few days. It wouldn't boot into the session even with extensions off. I tried everything(removing old configuration files, setting an autostart on Gnome-shell in ~/.

  • Kuler in Illustrator CC not active

    The Kuler Panel in Illustrator CC doesn't react, it is grey. Can't import Kuler themes. I'm signed in in Illustrator as well as online in Kuler. It is possible to work in the Kuler App online. What's wrong with Illustrator? Thank you for answers

  • [SOLVED] All browsers using libwebkit crashing.

    Hi! I'm having a problem with webkit based web browsers. All of them crash when i go to google.com. In console it says "Illegal instruction". What causes this and how could I fix it? Last edited by rasmuz (2012-05-31 20:19:01)

  • Keep getting error 304 when trying to login into icloud

    Can anyone help me