Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Disable fields using JQUERY - Enabling fields when submit button pressed.

user12111409Jun 7 2013 — edited Jun 10 2013
Hello,

I am using Apex 3.2 on Oracle 11g.

I am new to JQUERY.

The following jquery code disables/enables fields based on radio button selections.


<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
<script>
$(document).ready(function(){
$(":radio[value='D'][checked='true']").each(function(index)
{$("select[name='" + $(this).attr("name") + "']").attr("disabled", true).val("N");
});
$(":radio[value='D']").click(function()
{$("select[name='" + $(this).attr("name") + "']").attr("disabled", true).val("N");
});
$(":radio[value!='D']").click(function()
{$("select[name='" + $(this).attr("name") + "']").removeAttr("disabled");
});
});
</script>


Problem: I would like to ensure that any "disabled" fields are enabled when a submit button is pressed.

What code can be added to jquery that designates that the submit button has been clicked and the fields enabled?

I have been struggling with this for awhile so any help would be appreciated.

Thank you.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 8 2013
Added on Jun 7 2013
5 comments
1,197 views