Disable Html button in validation process using pl/sql

Hi,
I need to disable a html page button. It gets re-enabled afer a validation process is run on the page and errors for the form are returned. I need a way of writing a validation process using pl/sql returning boolean, that can disable the button again.
I've tried:
IF lname > 0 THEN
Return TRUE;
Else
htp.p('<script type="text/javascript">');
htp.p('document.getElementById("NEW_ENTRY").disabled=true');
htp.p('</script>');
Return FALSE;
End If;
The button id is NEW_ENTRY, but this is ignored and the buttons remains enabled.
Any ideas on how to change the code to work?

You have to create after region process that will be triggered on some condition.
htp.p('
<script type="text/javascript">
   document.getElementById("NEW_ENTRY").disabled="true";
</script>
');

Similar Messages

  • Queue Concurrent Processing using PL/SQL notification

    I have a queue that I need to have the processing done concurrently no matter how many messages are in the queue.  Currently one 1 message is processed at a time, but I need at least 10 processed at once.  Each message could take up to 3 minutes to process so doing one at a time is taking too long when the number of messages grows to more than 5 or 10.  How can this be done?
    begin
      DBMS_AQADM.CREATE_QUEUE_TABLE
      ( queue_table => 'z3.health_check_qtab',
        queue_payload_type =>  'z3.sil_queue_msg_typ',
        multiple_consumers => TRUE );
      DBMS_AQADM.CREATE_QUEUE
      ( queue_name => 'HEALTH_CHECK_Q',
        queue_table => 'z3.health_check_qtab');
      DBMS_AQADM.START_QUEUE
      (  queue_name => 'HEALTH_CHECK_Q');
    end;
    begin
      dbms_aqadm.add_subscriber
      ( queue_name => 'Z3.HEALTH_CHECK_Q',
        subscriber => sys.aq$_agent( 'HC_recipient1', null, null ) );
    end;
    BEGIN
      dbms_aq.register
      ( sys.aq$_reg_info_list(
        sys.aq$_reg_info('Z3.HEALTH_CHECK_Q:HC_RECIPIENT1',
                         DBMS_AQ.NAMESPACE_AQ,
                        'plsql://Z3.Z_IMPACT_LIST_PKG.DEQUEUE_HEALTH_CHECK',
                        HEXTORAW('FF')) ) ,
      1 );
    end;
    Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

    I'm also looking into how to do this (on 10gR2 RAC). I would like to enqueue say 1,000,000 requests and have 10-30 (configurable) worker 'threads' dequeueing and executing a PL/SQL procedure during certain parts of the day.

  • Disable Report Button Once Clicked.

    Apex 3.2
    In my application I have been able to disable html buttons, once the user has clicked them, using
    the following in the url of the button.
    javascript:this.disabled=true;this.value='Creating DC...';doSubmit('SUBMIT');
    I have several updateable reports, that contain buttons. I would like to disable these buttons, when clicked,
    but do not know how.
    At the moment the sql in the report for the button is
    '<input type="button" name="map" value="Add Mapping" onclick="mapdc(''mapdc'','||whid||')">'  map
    and I have some javascript in the page header
    <script language="JavaScript" type="text/javascript">
    function mapdc(Request, whid){
    var answer=confirm("Do you really want to map Whid " +whid+ " to Gwhid " +$v('P39_GWHID')+" ?");
    if(answer==true) {
      $x('P39_WHID').value = whid;
      doSubmit(Request);
    </script>
    Any ideas ?
    Gus

    Think I may have sorted this out,
    Changed my javascript to
    <script type="text/javascript">
    function runjob(request,jobid){
    var answer=confirm("Do you really want to run job id "+jobid+" ?");
    if(answer==true) {
      $x('P3_JOBID_2').value = jobid;
    $x_disableItem('P3_RUN_JOB',true);
    $x('P3_RUN_JOB').value = 'Running Job...';
      doSubmit(request);
    </script>
    and my sql to
    '<input type="button" name="run_job" value="Run Job" id="P3_RUN_JOB" onclick="runjob(''run_job'','||jobid||');">' end  run_job
    Gus

  • Screen Personas 2.0 Enable/Disable script button in Javascript

    Hi,
    Has anyone tried enabling or disabling script buttons on a flavor using Javascript. I have two script buttons,
    The first one (Button1) searches for a contract based on the contract id provided by the user in a text box. (So, the script triggers the transaction me33k, fetches and displays the relevant fields in the flavor)
    Now, based on whether the contract is present in the system the user needs to click another script button (Button2) which will allow him to create an order. Currently the button is disabled (ScriptButton.IsEnabled = false in the Properties menu).
    In the Button1 script towards the end, I need to enable Button2 is a contract is found. So in the Button1 script, at the final step I try to calculate in JS and write the following JS code,
    var args.btn2id = document.getElementById("Personas/blahblahblah");
    args.btn2id.disabled = false;
    But this is never works. And I have noticed that the control id does not return the control object in Javascript (so, args.btn2id is always null) and I tried removing the '/' and various other options.
    Has anyone ever tried to enable/disable buttons in Personas? Is it even possible?
    Abhijeet

    You don't have access to the Personas control properties from JavaScript to dynamically change them.
    About the only thing that comes to mind is Tobias' method to hide the script button if you want to disable it.

  • Button on Interactive Report to fire a process using JavaScript

    I have a requirement to trigger a process from a button on an interactive report. One of the report columns has the triggering data allowed to make the process fire. The requirement is that the button says different things based on the value from another column in report.
    My button is an html button that when the process is allowed to run, is enabled and fires a javascript function. When the process is not allowed to run for the row where the button is placed, the button changes text, color and is disabled.
    The switching of the HTML button is working properly. The problem is that I am not able to grab the column value from the report to submit with the onclick() event.
    As best I can tell, there is not unique id tag on the report columns and the best that I am able to do is to apply one class to the button and another class to the column that contains the value that needs to be submitted on my onclick() event.
    I have considered using a link column that does a submit to a URL passing in the desired value but I would lose control of the appearance of my button.
    Does anyone have a suggestion?
    Thanks

    In debugging while clicking on back button for first time, I found that after 'Leave to screen 0' statement debugger goes to double click event of screen 100 and start processing from a statment written immediately after 'Call screen 200' statement.
    Yes, that's right. The processing will be continued from next stamtement after CALL SCREEN 200. But after the PAI will finish it shoud go to NEXT SCREEN which is 0.
    If that doens't work you can try leaving the screen 100 explicitly as well.
       CALL SCREEN 200. 
       LEAVE TO SCREEN 0.  "the processing will terminate screen 100 as well
    Try it out.
    Regards
    Marcin

  • Disable HTML Item Button Onclick

    Apex 3.2
    We are only using HTML buttons in one of our applications.
    I use the following code, for example, on my page buttons (region buttons) to disable them after they have been clicked by the user
    URL Target
    javascript:this.disabled=true;this.value='Refreshing Page...';doSubmit('REFRESH');
    Is there anyway to do this with a HTML item button, which we use for search and reset buttons.
    Thanks in advance for your help
    Gus

    Gus,
    Give this a try.  It is very similar to yours.  It is used on an html button to guard against double clicking.
    Put this in the URL Target. PROCESS is the name value of the button
    javascript:this.disabled=true;doSubmit('PROCESS');

  • How to use buttons in hcm process and forms?

    Hi Experts,
    I want to know how to use buttons in HCM process and form.
    And when i click on the button it was validating all the fields and it was throwing an error ( complete SACHP fields) i am not using this filed in any where of my form.
    So, please help in getting out of this error. And help me with some document, which method will  trigger once we click on the button.
    Thanks & Regards,
    Rocky

    You do not need to add this field to your list. In the view V_T588MFPROPS (SAP delivered), this field is set as mandatory. In configuration, you must maintain the view V_T588MFPROPC (Customer area) and make sure the field is not set to mandatory. This will override the SAP delivered setting and the error message will be not be displayed.
    Derrick Banks
    Banks & Company, LLC

  • Button action bypass validation without using Immediate=true

    I have a Form in a page, and a "Query" button to popup a dialog for user to search some information, and help user to fill-in some fields.
    I want the "Query" button to ignoral all the validations in the Form (e.g.: required fields). I tried to set the Immedate for the button, but I found I cannot set any inputText value inside ReturnListener event-handler with Immedate is true.
    Is there anyway to have a button to action, and bypass all the validation without using Immediate=true?
    Thanks,
    Samson Fu

    Hi,
    if you are on JDeveloper 11g, have a look at the skipValidation property on the ADF binding and read: http://oracle.com/technology/products/jdev/tips/fnimphius/ppr_subform/index.html
    You can implement a similar approach
    Frank

  • How to Disable a Button Using JavaScript

    Hi,
    I want to disable a button based on a condition. I am using a template based button (button Alternate 3). I am using Theme 3. I have created buttons of type item but when I view the source there is no button name populated in the html. My javascript is not disabling the button.
    Please advice.
    Thanks
    sukarna

    Hi,
    You can't disable an A tag (FireFox, for example, will still let you click the "link").
    What you could do would be to create a second button that doesn't work and only show one of these at a time.
    I have done that here: [http://apex.oracle.com/pls/otn/f?p=35917:30]
    The Button has been based on a custom Button Template. The definition for this is:
    &lt;table class="t10Button" cellspacing="0" cellpadding="0" border="0"  summary="" id="#BUTTON_ATTRIBUTES#"&gt;
    &lt;tr&gt;
    &lt;td class="t10L"&gt;&lt;a href="#LINK#"&gt;&lt;img src="#IMAGE_PREFIX#themes/theme_10/button_left.gif" alt="" width="4" height="24" /&gt;&lt;/a&gt;&lt;/td&gt;
    &lt;td class="t10C"&gt;&lt;a href="#LINK#"&gt;#LABEL#&lt;/a&gt;&lt;/td&gt;
    &lt;td class="t10R"&gt;&lt;a href="#LINK#"&gt;&lt;img src="#IMAGE_PREFIX#themes/theme_10/button_right.gif" width="4" height="24" alt="" /&gt;&lt;/a&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;/table&gt;
    &lt;table class="t10Button" cellspacing="0" cellpadding="0" border="0"  summary="" id="#BUTTON_ATTRIBUTES#_DISABLED" style="display:none"&gt;
    &lt;tr&gt;
    &lt;td class="t10L"&gt;&lt;img src="#IMAGE_PREFIX#themes/theme_10/button_left.gif" alt="" width="4" height="24" /&gt;&lt;/td&gt;
    &lt;td class="t10C" style="padding:1px 4px;"&gt;#LABEL#&lt;/td&gt;
    &lt;td class="t10R"&gt;&lt;img src="#IMAGE_PREFIX#themes/theme_10/button_right.gif" width="4" height="24" alt="" /&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;/table&gt;This actually creates two buttons - the first one, which actually has the link, is visible to start with. The second one, which has no link at all, starts off as invisible.
    Both buttons use the #BUTTON_ATTRIBUTES# setting to get the button name into the ID - though the second button adds "_DISABLED" to this so that it has a unique, but known, ID
    Then it is just a case of calling a function to show one button and hide the other or vice versa:
    &lt;script type="text/javascript"&gt;
    function disableButton()
    document.getElementById('P30_TEST_BUTTON').style.display = "none";
    document.getElementById('P30_TEST_BUTTON_DISABLED').style.display = "block";
    function enableButton()
    document.getElementById('P30_TEST_BUTTON').style.display = "block";
    document.getElementById('P30_TEST_BUTTON_DISABLED').style.display = "none";
    &lt;/script&gt;Another possibility is to add the #BUTTON_ATTRIBUTES# to the TABLE tag instead of the A tag in a new button template (based on a copy of the normal Button template). Then, the ID value would be applied to entire "button". You can then make this invisible using:
    $x('BUTTON_ID').style.visibility = 'hidden';The button will be removed from the page as far as the user is concerned, so they can not click the link.
    Andy

  • Html Button Disable/ Template button?

    I am certain that there is a post out here I just cannot find it.
    I have a bunch of users who are remote and have various connection speeds.
    They get inpatient and click my Template Based button multiple times
    Causing multple entries
    I have changed my button to a HTML button and use the
    Optional URL Redirect
    javascript:{this.disabled=true;doSubmit('Create');}
    to disable
    This works but the button is "A html button"
    IS there a way to have the HTML button look like my Template Buttons?
    My background:
    Don't sleep conferences
    Not a Web developer "I know how to spelll HTML"
    I have also attempted to create a new button template using #Button_Attribute# substituted for #link# in template but I cannot get the Button to Disable

    You could create an image that looks like the template button is rendered, and create a custom button template using &lt;input type="image" #BUTTON_ATTRIBUTES#...&gt;, specifying src="image_url" alt="image_alt_text" in the Button Attributes.

  • HTML Button use an image instead of Text

    I have an HTML button in its own region called A_BUTTON, its current Button display attributes are
    sytle: HTML Button
    Attributes: name="A" class="where_clause_button"
    what it does is i use a dynamic action based off the where_clause_button jquery selector and use javascript to update a hidden field. I would now like to use the Oracle Logo for example as the image of the button instead of using a text label for it. I tried adding to the Attributes src="http://www.oracleimg.com/admin/images/ocom/hp/oralogo_small.gif". When i run it the button still works the same as before but without the image and retains its Text Label, in this case its A.
    the html it generates is for the button during runtime is:
    <input type="button" src="http://www.oracleimg.com/admin/images/ocom/hp/oralogo_small.gif" class="where_clause_button" name="A" onclick="apex.submit('');" id="A_BUTTON" value="A">
    How do i retain the functionality of this button but make it an image button?
    Edited by: Brobot on Feb 9, 2011 5:22 PM

    <li>Use a template based button and customize the template with the image.
    <li>Add appropriate JS code to the URL section(prefixing with "javascript:" ) and optionally add a some ID attribute for easy JS access.

  • Using Tiscali Webmail with Firefox 6. If I try and delete an email the Ok and Cancel buttons are disabled and nothing happens, have to use F5 to take me back. IE8 works so is this a compatibility issue?

    Using Tiscali Webmail with Firefox 6. If I try and delete an email the Ok and Cancel buttons are disabled and nothing happens, have to use F5 to take me back. IE8 works so is this a compatibility issue?

    It appears OP solved the problem: [/questions/874744]

  • Cannot disable a button 2 times using an EL expression

    Using a EL expression for the disabled attribute on a button does not work the second time... It will not disable again.
    Below is a simple example.... The EL updates the text of the button but does not enable/disable the button.
    Any help would be greatly appreciated!
    JSPX Code:
    <af:showDetailHeader text="Enable/Disable Test" disclosed="true">
    <af:panelGroupLayout>
    <af:panelFormLayout labelWidth="150" fieldWidth="300" rows="1" maxColumns="1">
    <af:commandButton text="Toggle isButtonEnabled - value = #{ToggleTestBk.buttonEnabled}" disabled="#{ToggleTestBk.buttonEnabled}" partialTriggers="toggleBtn">
    </af:commandButton>
    <af:commandButton id="toggleBtn" text="Toggle Button" actionListener="#{ToggleTestBk.toggleButtonAL}" partialSubmit="true">
    </af:commandButton>
    </af:panelFormLayout>
    </af:panelGroupLayout>
    </af:showDetailHeader>
    Backing Bean Code:
    private boolean buttonEnabled = true;
    public void toggleButtonAL(ActionEvent event) {
    setButtonEnabled(!buttonEnabled);
    public void setButtonEnabled(boolean _buttonEnabled) {
    this.buttonEnabled = _buttonEnabled;
    public boolean isButtonEnabled() {
    return buttonEnabled;
    Thanks!
    Matt
    Edited by: Matt Cannon IBI on Apr 3, 2010 4:28 PM

    Hi,
    try two things:
    1- check your backingbean scope if it is request scope try to change it. (try make it session scope).
    if it is not working ....
    2- try your backingbean like this:
    private boolean buttonEnabled = true;
    public void toggleButtonAL(ActionEvent event) {
    isButtonEnabled();
    public void setButtonEnabled(boolean _buttonEnabled) {
    this.buttonEnabled = _buttonEnabled;
    public boolean isButtonEnabled() {
    setButtonEnabled(!buttonEnabled);
    return buttonEnabled;
    }Sameh Nassar

  • Use rich:fileUpload/ to enable/disable my buttons with checking file names

    Hello!
    I need to upload some files with using <rich:fileUpload>,and i did it but i need to check file names for some reasons and enable or disable upload button but my problem is that when i open my modal panel and click add button of <rich:fileUpload> and then add upload button of <rich:fileUpload>(not my upload button but upload button wich <rich:fileupload> has) i check file name but the button is not enable/disable until i close my modal panel and open it agin,so i need to know how to modify my code to make it work?
    <rich:modalPanel  id="uploadFile" autosized="true" resizeable="false">
                    <f:facet name="header">
                     <h:panelGroup>
                         <h:outputText value="uploadFiles"></h:outputText>
                     </h:panelGroup>
                 </f:facet>
                 <h:form>
                      <rich:fileUpload  maxFilesQuantity="#{uploadBean.maxUploadFiles}" allowFlash="true" fileUploadListener="#{uploadBean.uploadListener}" immediateUpload="false"/>
                             <table>
                                <tr>
                                     <td><h:commandButton disabled="#{!uploadBean.xlsNameValid}" rendered="#{!uploadBean.admin}"  action="#{uploadBean.upload}" value="upload" /></td>
                                     <td><h:commandButton action="#{uploadBean.clearFiles}" value="cancel" id="cancel"/></td>
                                </tr>           
                           </table>
                 </h:form>
                 <rich:componentControl for="uploadFile" attachTo="cancel" operation="hide" event="onclick"/>
              </rich:modalPanel>

    No the problem is that file is being checked on server side, but if file is invalid the button Upload(my button ,not standart rich:fileUpload) must be disbaled,and shown,but i have to close this modal panel and open it again to see my button enabled/disabled

  • Disable 'SAVE' button on 'FILE' menu on some forms using personalization

    Hi there,
    I need to disable 'SAVE' button on 'FILE' menu on some forms using personalization. Please let me know if you know how to do this. Currently we have done this through custom.pll and we are trying to phase out custom.pll. Any help is appreciated.
    thanks
    Sudeep

    whether i know u cannot disable SAVE toolbar through Personalization. You do it with custom.pll.
    CHECK FOLLOWING LINK
    Disable Save item from Contrl Menu
    Pradhyumn Sharma

Maybe you are looking for

  • FF logs in different location ( Not FF tables)

    Hi Can we have FF logs in different location other than the backend tables? My client wants to have the sensitive FI and HR data logs maybe in a share restricted network drive / folder. Is this worth it? If anyone has done this, please share your exp

  • Adobe Photoshop Elements 8.1 Error 150:30

    After many years of using Adobe Photoshop Elements 8.1 I suddenly get the error 150:30, restart the computer. After restart the error is still the same. What to do?

  • Reg.. Schedule lines

    We have created a ztable by name zcpdcurr,zcpdhtry,.... I have fetching data from two tables zcpdcurr and vbep.. while fetching data i need to check the 'order qty(wmeng)' in vbep and 'cpd_qty' in zcpdcurr. *If less then we need to make the cpd_qty i

  • Any plan to support 21 CFR part 11?

    If NI didn't support 21CFR part 11, I must change to another scada program. Do you have any plan to support 21CFR part 11?

  • ITunes WILL NOT let me sync music onto my iPhone 4!

    I am having so much trouble with this! I have read that if you create a playlist with the songs i am wanting to put on my iphone, it will work.. but it doesn't. The playlist is added to my iphone but is empty?! I have also tryed syncing automatically