jQuery ' setting everything in read ONLY based on a page element "not working

I'm trying to use jQuery to set fields of seizure any "read-only" If the question is 'locked' status (i.e., if the P2_QUESTION_LOCKED page is set to Yes ('Y')). Here is the code that I placed in page attributes (in the javascript section):
if ($x('P2_QUESTION_LOCKED') )
   {
   if ($x('P2_QUESTION_LOCKED') == 'Y') 
      {
       $(document).ready(
       function() {    $('input').attr('readonly','readonly'); });
      }
   }
It does not work. All the fields are available for input. I used Firefox 1.6 and Firebug, and I have no errors. What Miss me?

An example is implemented at the APEX. ORACLE.COM:
Workspace: RGWORK
Application: Disclosure of financial information (Application 45806)
Username: TESTER
Password: test123
Run the application and click on "Update of the current year" in the list.

Robert
http://apexjscss.blogspot.com


Robert

Hello

And you know that this readonly attribute is only for text and password elements?
http://www.w3schools.com/tags/att_input_readonly.asp

Kind regards
Jari

Published by: jarola December 14, 2010 17:28

I made the change to javascript

 $('input[type="text"]').attr('readonly','readonly');
 $('input:not([type="text"])').attr('disabled',true);

Published by: jarola December 14, 2010 17:38

And of course, you do not disable if hidden items

 $('input:not([type="text"],[type="hidden"])').attr('disabled',true);

Tags: Database

Similar Questions

  • How could put editable report column as read only based on the other domain

    Hello world

    I'm new to APEX. I have a modifiable tabular report (SQL query). When I choose the column (which is a selection list) of a certain value, I want column B to be read-only (depending on the result of an another SQL described below). It doesn't seem to be a READ ONLY section in the type of tabular report where I could put my SQL condition.

    In other words, "column B" must be read only based on SQL returning following true or Exists:
    Thus, to determine if column B is ready only, I need the following logic:

    SELECT 'x '.
    of tab1
    where key = (value of column A)
    and the flag = "Y".

    Any help would be greatly appreciated!
    Thank you
    François

    You can only do so if your tabular presentation is a manually created. In this example, it shows how to set this property:

    http://Apex.Oracle.com/pls/OTN/f?p=31517:170

    You can use a case statement to set this property for specific lines.

    SELECT empno,
           CASE
              WHEN ename LIKE 'A%'
                 THEN apex_item.text
                                  (34,
                                   job,
                                   80,
                                   100,
                                   'style="width:170px" readonly="readonly"',
                                   'f34_' || '#ROWNUM#'
                                  )
              ELSE apex_item.text (34,
                                   job,
                                   80,
                                   100,
                                   'style="width:170px"',
                                   'f34_' || '#ROWNUM#'
                                  )
           END job
      FROM emp
    

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Opal-consulting.de/training
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    http://www.Amazon.de/Oracle-Apex-XE-Praxis/DP/3826655494
    -------------------------------------------------------------------

  • Why not make a text box read only based on drop-down of work?

    Hello experts.

    I received help on this a few hours ago, and it has worked very well so I closed the discussion and form.  However, now it no longer works and I don't know what I did.

    I have a form with a dropdown list and two text boxes.  The first text box is populated according to the value selected in the drop-down list, I used a simple table of the to do and it works as expected.  I had to bring textbox2 read only based on some selections in the drop-down field.  It worked very well at the beginning, but now it no longer works.  I did not any changes to the form except that I closed and since.

    I try to get the following to work:

    If (this.rawValue is "Junk" again)

    {textbox2.access = "readOnly" ;}

    If (this.rawValue is "More Junk")

    {textbox2.access = "readOnly" ;}

    I put this in the change event using javascript.  I use ARE 8.2 on Windows Vista 32 bit.

    Any help would be greatly appreciated.

    Thank you

    Jerald

    In the case of change you can't get the rawValue... So, use xfa.event.newText to get the modified text...

    Also, you have a space at the end of the value while comparing. In the code below I removed it.

    If (xfa.event.newText is "Junk Again")

    {textbox2.access = "readOnly" ;}

    If (xfa.event.newText == more "junk")

    {textbox2.access = "readOnly" ;}

    Thank you

    Srini

  • Field read only based on the authorization form

    Hello

    I have a field in a tabular presentation read only based on a permission scheme, as you can for a field in the region with the help of a condition of PL/SQL. Is it possible to do this?

    See you soon,.
    Andrew.

    Hi André,.

    Caught this idea,

    Please create a plus column within the report using as "alaisecolumnname" then

    column with editable text for authorization schema [ISADMIN] box
    draw sheet column with displayonlytext for authorization shcema [NOTISadmin]

    I hope that it will match your expected results, I tested it in my workspace works very well for me

    Thank you
    Select this option.

  • Hello, "set as Start Page" does not work for me. Anyone has any idea why?

    My "set as Start Page" does not work... anyone know what I can do?

    Thank you!!

    So, you tried to set the homepage under areas of site?

    What is now your start page?

  • Set the mail read-only account

    I have a shared corporate email account that I use for the read-only.

    I'm not supposed to use that account to send emails, but have had a few close encounters.

    Is it possible in the e-mail settings that I can put an account to "read only"? I won't be able to write, move or remove anything through the mail application.

    This method would be much safer double checking each email before I send, sometimes I have to email very quickly and forget to double check.

    It is not a 'read only' option for e-mail accounts, but you can set the SMTP to zero.  SMTP Simple Mail Transfer Protocol, but what it does is Send Mail To People.

    Mail-> Preferences-> accounts-> account information

  • How to make any attribute to select one option to read only based on different att

    I have two select a choice .one attribute is to create without binding and another is based on the control of data .i don't want to write code in backing bean to make read-only attribute.

    Example:
    < af:form id = "f1" >
    < af:selectOneChoice label = "Label 1" id = "soc1.
    autoSubmit = "true" >
    < af:selectItem label = 'Y' value = 'Y' id = "si3" / >
    < af:selectItem label = "N" value = "N" id = "si1" / >
    < / af:selectOneChoice >
    < af:selectOneChoice value = "#{bindings." ViewObj.inputValue}.
    label = "#{bindings." ViewObj.label}.
    required = "#{bindings." ViewObj.hints.mandatory}.
    shortDesc = "#{bindings." ViewObj.hints.tooltip}.
    ID = "soc2" partialTriggers = "soc1" >
    < f: selectItems value = "#{bindings." ViewObj.items}"id ="si2"/ >
    < / af:selectOneChoice >
    < / af:form >

    on the basis of the choice of a second selection select choice should be disable.



    I know I need to link select all first choice of backing bean also make self submit true and add partialTriggers in second select only one option.


    Please give me advice


    Thank you

    Prateek

    is there a any error

    Yes, Af.l1 in your case is the component itself not the value returned by the list.

    Change it like this:

    
         
         
              
              
         
         
              
              
         
    
    
    package a;
    public class A {
         private String l1;
    
         public A() {
         }
    
         public void setL1(String l1) {
              this.l1 = l1;
         }
    
         public String getL1() {
              return l1;
         }
    }
    

    Jean Lou

  • Index.HTML is read only file, can be seen but not changed, how do I cancel the setting?

    Hi, I don't know when or how I made this file "read only".

    For this reason, I am unable to put it on a server, please help.

    Dreamer101.1

    Is the file on your hard disk or on modified such as a CD - R media?

    If it's on your hard drive, right click and select Properties (or get information on Mac). In Windows, uncheck the 'read only' and click on apply. In Mac open sharing and permissions drop-down, click the lock and enter your password (if necessary), and then set each user the privileges of the name & read/write, and then close the info window.

    If it's on a CD - R, you must copy it to your hard drive so it can be modified and put it on a server.

  • How to do a table read only based on a button click event

    I have two tables: table of an insert and a single table reading and calculate the button between the two.
    When the user has entered the values of the first array and push the button calculate, the second table is supposed to show the result.
    I want to calculate the first table to read only when the user clicks the button.

    JDev 11.1.1.5.0
    ADF BC

    You will need to write an EL to the readOnly attributes property in the table representing a Boolean parameter and put a PPR on the table during the click on the button calculate

    readOnly=#{pageFlowScope.isCalculateButtonClicked}
    
  • How to fill a field read-only based on selections from 2 DDlists?

    Follow-up question:

    http://forums.Adobe.com/message/2417876#2417876

    I have 2 drop-down lists.  'Department' and 'unit '.

    The selection in DDlist 'Department' creates a single list in DDlist 'unit '.

    I select the appropriate of these two DDlists elements.

    When I do this, I want the text read-only 'NameOnIDBadge' field is filled with a predefined entry.

    Example:

    In DDlist "Department", select the item «Finance & Administration»

    In DDlist 'Unit', select the 'Food Service' item in the list that appears

    THEN:

    In the text field read-only 'NameOnIDBadge' of the following built-in read-only text appears: "contract food serv.»

    (Thanks to Paul, I already know how to do selection in DDlist 'Department' affect the selection list in DDlist 'Unit')

    "but I don't know how to make the choice of these two DDlists to create a new entry in a text field).

    I have attached a mock-up of the file that I work with...

    If ((firstDDList.rawValue="Whatever") & (secondDDList.rawValue = 'Whatever'))

    yourTextBox.rawValue = "the text on the right"

    This code would go under the second output of DDList event, replace the code I put in there to add the control to the first DDList

  • When I uncheck "read only" on a folder, it will not be checked. Help!

    I moved a file of data to a new partition.  The program, I am running of this partition should write to the folder, but the attribute is "read only." When I right click on the folder and uncheck the 'read only' that will change the attribute and it will do the same on the subfolders.  However, when the file is closed and come back, he is still "read only."  As a result, the program that I use cannot work properly.  I know this has something to do with permissions but do not know what to do next. I am the only user on my pc with Vista Home Premium installed at home.  Any tips, suggestions or alternatives?  Thank you.

    Found my own answer.  Vista requires programs to install with "Run as Administrator" to have all the folder permissions.  So, I reinstalled my program using 'Run as Administrator' and moved the data folder to the target disk.  The folder moved with all permissions, and everything's fine.  Hope this helps someone else!

  • Make the fields to a custom read-only after clickingsubmit button page to insert page

    Hi all

    I have a custom insert page. When the user enters and click on submit, I want to do all the other fields read-only except 'create another button of registration '.

    Also, I have a lov in my custom page, when the user selects invalid values, error messages will be displayed. My problem is same after displaying the error message, the user has the option to navigate to the order of the day and enter data and submit. How to prevent the user to navigate to the order of the day if the value entered is not valid.

    Please suggest your ideas.

    Option 1: Add a controller to the dynamic region and ad whereclause LOV to limit the LOV query, so that it will not allow the user to select the 100.

    Option 2: The LOV (if required), just remove the value of the element LOV LOV action, based on the State.

    I hope this helps.

    See you soon

    AJ

  • Cannot modify read-only profile settings and Firefox will not organize.

    can access my profile properties. Uncheck the read-only, apply and save. Read and open the properties only is checked.

    The profiles.ini file created or updated correctly to indicate the location of the profile?

    This error message you get (if any) when you try to start Firefox?

  • NICs not appearing only in normal mode and wireless not work not (witness still on orange)

    Hello all and thanks to anyone who responds! I'm pretty clueless when it comes to computers, so I hope it's just something simple.

    I am running Windows Vista Home Premium with a Presario F700. The processor is AMD Athlon X 2, processor Dual-Core TK - 55 1.80 GHz. 958 MB RAM and 32 - bit operating System.I don't know if you need this information but better safe than sorry. OK for the problem.

    The computer is supposed to be wireless, but I cannot make it work. When I go to Device Manager in a single Normal boot device shows. It is said: NVIDIA nForce 10/100 Mbps Ethernet #2. I'm not sure what that means, but he says that this device does not work correctly. I couldn't HP Wireless Assistant to work so I followed some advice that I've seen an uninstalled but that did not help at all. I'm sure that's not my firewall is disabled. And I use Norton Security, but I don't know which is not affecting him either since it was a problem before I installed Norton.

    Also, if I boot mode safe more things highlighted in Device Manager. For example, it shows these: card 6TO4, isatap.hsd1.fl.comcast.net, NVIDIA nForce 10 / 100 Mbps ethernet #2 miniport (IP) wide AREA network, wide area network (IPv6) WAN miniport, miniport Wan WAN (L2TP), miniport WAN (PPPOE), miniport Wan WAN (PPTP). But only in Safe Mode. Even if I try Boot Mode safe mode w / Networking they always disappear and it's the only one. I have tried everything I know how to do but I'm at a loss as to what prevents it from loading the Normal start.

    On a side note, someone said to make sure that the adapter is enabled in the BIOS and I checked and the only thing remotely sounding like a NIC is enabled. He wasn't that anything listed in the order of boot on an adapter until recently, and it's at the bottom of the list with an exclamation mark next to it. However, the exclamation point is now gone, but NIC is always at the end of the list. I also ran the check disk thing, and he came back fine. I ran a full scan of the system without any problems but a few tracking cookies. I tried to uninstall in safe mode and start back to normal to leave the computer to reinstall without success. I also used the option reset back to the factory. While time consuming which did not help either.

    If anyone has any ideas as to what I can I would be very happy. I'm hoping to give this computer to my brother as a Christmas gift. Sorry for the long post but I wanted to make sure I was as complete as possible to save everyone time. Thanks again. And if I missed any information please let me know and I'll fix it.

    If reset you to factory, it should work.  It is a switch broken (I don't him think) a motherboard problem or probable internal problems with the wireless. Take it to a store because it is a common problem with these computers.

  • Download Adobe Reader distribution license link - error page 404 not found

    I recently asked Adobe for Adobe Reader distribution certificate. This succeeded, shortly after application, I received an email with the attached license and a download link for Adobe Reader XI, the problem is the link does not work I just get 404 page not found, the link I can not put here that the license will be broken.

    For full installers:
    To download the English version of Adobe Reader XI with Acrobat.com in compressed format .exe, click here.
    You can not share the above link, share information with others, or publish the above link on websites, blogs, or by any other means that are publicly accessible. The information contained on this site are intended for your use only in accordance with the Adobe Reader Distribution License Agreement you have agreed. You can lead others to http://www.adobe.com/products/reader/rdr_distribution1.html for application distribution rights.

    What I need to know is someone (from Adobe) can send me a link of substitute it, can I re-request certificate get another link or even better sub this license can I download the software from Adobe - download Adobe Reader - all versions instead. I contacted the support chat Adobe, who directed me to phone support, assistance telephone flat refused to help and would only support via this forum.

    I hope someone here can answer my questions.

    Thank you all.

    Try this one. Adobe - Adobe Reader Distribution

Maybe you are looking for