I am attempting to use jQuery to set all input fields to "readonly" if the question is in "locked" status (i.e., if P2_QUESTION_LOCKED page item is set to yes ("Y")). The following is the code that I placed in the 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 is not working. All input fields are available for input. I used Firefox 1.6 and Firebug and I have no errors. What am I missing?
An example is set up in APEX.ORACLE.COM:
Workspace: RGWORK
Application: Financial Disclosure (Application 45806)
User Name: TESTER
Password: test123
Run the application, and click on 'Update Current Year's' from the list.
Robert
http://apexjscss.blogspot.com
Robert