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');

Similar Messages

  • Html panel + button + onclick

    HI Everybody!
    I'm sorry for my language skill but I can't speak english very good but I hope you understand what am I want.
    So I have a problem because so I would like to make a button with an onclick attr. like this:
    <input type="button" onclick="categ.loadContent('example.html');" value="whatever">
    but it is doesn't work ... I don't know why.. because the categ object is exist..
    I got this error msg: "categ.loadContent is not a function" but if I replaced the button to an "a" tag like this:
    <a href="javascript:categ.loadContent('example.html');">link</a> it is work
    Please Help me!!! Thanks for everything!
    Best regard's,
    Matt

    do you have a online url?

  • Disable new item button

    Hi , 
    Is there any way that i can disable new item creation of item if count equal to 100 . 
    Abhishek Tiwari

    Hello,
    You can disable button from ribbon and page using jquery but if user is smart enough then he/s can add item directly open the newform.aspx page. Refer below links for jquery, and you also need add code to access list using lists.asmx to get item count from
    list.
    https://social.msdn.microsoft.com/Forums/en-US/1e2ef4bc-428f-4a9b-a0c3-82a0535a36cb/hide-new-item-button-in-ribbon-jquery?forum=sharepointdevelopmentprevious
    http://sharepoint.stackexchange.com/questions/15740/remove-add-new-item-functionality-from-lists
    If you really don't want add item after 100 then event handler will be good solution. Where you can check item count and if it reach to limit then remove user permission OR cancel the event.
    http://www.c-sharpcorner.com/UploadFile/54db21/remove-group-permission-to-list-in-sharepoint-2010-programma/
    http://rmanimaran.wordpress.com/2010/10/11/programatically-adding-and-removing-permission-to-a-group-in-sharepoint-list/
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see<br/> Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • Cant disable item button

    I tried to disable page item button with dynamic action option (Disable) and with javascripts
    document.getElementById("IDOFBUTTON").disabled = true;
    calls: $x_disableItem
    but dont work, any idea?
    Thanks

    Hi,
    >
    Im added a new dynamic action
    onPageLoad > Execute Javascript > $("#TEST").unbind("click");
    Event scope : Bind
    but cant make it work...
    I know that it depends of themes/templates. (my is theme 23 in Apex 4.1)
    >
    I presume you have specified TEST as the Static ID of the Button.
    To disable button you will need to remove the href attribute
    $("#TEST").removeAttr("href");To enable it you will need to add the href back
    $("#TEST").attr("href","javascript:apex.submit('<REQUEST /BUTTON NAME>')");Cheers,
    PS: Inspect your button HTML Element. You will see something like this
    <td align="left"><a role="button" id="TEST" class="uButton" h ref="javascript:apex.submit('CLICK_ME');"><span>Click Me</span></a></td>
    NOTE: There should be no space in h ref, added it just to be able to post.
    In the above code
    id = "TEST" , where TEST is the Static ID of the Button. Required Button Template with #BUTTON_ATTRIBUTES#
    CLICK_ME is the Button Name, therefore the REQUEST submitted by the Button
    Click Me is the Test Label /Alt.
    Edited by: Prabodh on Aug 13, 2012 5:14 PM

  • 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...

  • 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>
    ');

  • 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 can we disable/Hide the buttons at items tab in header level Gen tab?

    Hi,
    How can i disable/Hide the buttons(Delete,insert...) in item details of general tab of Order Header?
    I am not able to do it with screen varients.
    Please let me know your views.
    Points will be given.
    Thanks,
    Adi.

    Hi,
    How can i disable/Hide the buttons(Delete,insert...) in item details of general tab of Order Header?
    I am not able to do it with screen varients.
    Please let me know your views.
    Points will be given.
    Thanks,
    Adi.

  • Delete/Disable  Print HTML/pdf Button

    Is there a Script that can be used to delete/disable print HTML/PDF button the dashboard page. I dont want to make changes in the OBIEE File as it will be reflecting for everybody. Can we use any script to disable it for a page and enable it on some other page.
    Thanks

    hi you can create a new css style sheet for portalcontent.css and inin the A:link modify like A:link { color:#2b7c92; text-decoration: underline;display: none}
    you can add this into whatever page you want using edit dashboard> page properties> styles.

  • Enable disable toolbar items on click on any checkbox,radio button,text box.

    Hi Friends,
    I am create application in eclipse RCP E4 and now i am trying to Enable disable toolbar items on click on any checkbox, radio button, text box .
    Please Help me friends....

    Hello friend my proble is solve and now i am sharing my solution ....
    I am create RCP application and view side any listener click event fire time apply this code
    IEvaluationService evaludationService = (IEvaluationService) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getService(IEvaluationService.class);
    evaludationService.getCurrentState().addVariable("noOfRowsChecked", noOfRowsChecked);
    evaludationService.requestEvaluation("com.jobsleaf.propertytester.canDeleteItem");
    and add plug in extension and create property tester class means listener property tester class side apply this code
    IEvaluationService ws = (IEvaluationService) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getService(IEvaluationService.class);
    Integer integer = (Integer) ws.getCurrentState().getVariable("noOfRowsChecked");
    if (integer != null)
    if (integer.intValue() > 0)
    return true;
    I hope useful above code when use property tester in eclipse RCP

  • Disabling a download button with fileDownloadActionListener onclick

    I have a download button with fileDownloadActionListener . I want to diable the button onclick to download the file. Now its showing the enabled condition so that user can click again and again;
    <af:commandButton text="Download Projects to Excel" id="cb2"
    >
    <af:fileDownloadActionListener filename="projects.xls"
    method="#{DownloadExcelListener.fileDownload}"/>
    </af:commandButton>
    Thanks
    Suneesh

    Try setting blocking="true" on the button.
    Pedja

  • 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

  • Region position vs. among items buttons

    Hello,
    Can someone from the HTML DB team, please, explain the logic behind the different functionality between these tow types of buttons? Why can't/shouldn't I use URL Redirection – for example – with the 'among items' button? I searched the forum for JavaScript and buttons, and it seems to me like it could help a lot of us to be able to call JavaScript directly from a button among items.
    Thanks,
    Arie.

    In retrospect, if I were to do this today, I would probably not even bother creating a button template, I would just create a display as text item with no label and nothing to display and just manually put the button in the Post Element Text like
    [INPUT type="button" value="Click me"  class="..."
    onClick="doSomething('#CURRENT_ITEM_NAME#')"]
    <script type="text/javascript">
    function doSomething(p_button_name)
    // decide if page needs to be submitted
    doSubmit(p_button_name);
    </script>

  • How can i disable a submit button and execute submit_action method on click

    Good Day,
    On my page I have a submit button that execute the submit_action method of the page backing bean that submit data captured on the page into a database and activate another class that send mail at the same time on a click of the submit button,the mail process takes a while before returning back to the page.I was able to disable the submit button to prevent the user from keep click while the process is running but the issue is on clicking the submit button it only disable the submit button without executing the submit_action method of the page backing bean.How can i disable the submit button and execute submit_method of the backing bean at the same time.
    Thanks in advance.

    I tried this out on one of my pages to see if it works.
    First, I added the following JavaScript to my submit button's onClick event:
    this.disabled=true; return true;When I clicked the submit button, it was disabled but the form was not submitted.
    I deleted the JavaScript from the onClick event and added the following JavaScript to the form's onSubmit event:
    var button = document.getElementById("form1:submitButton"); button.disabled=true; return true;When I click the submit button, it was disabled and the form was submitted but the button's action method was not called.
    The next thing I tried was to change the onSubmit event code:
    var button = document.getElementById("form1:submitButton"); setTimeout("button.disabled=true", 500); return true;This seemed to work. The difference was that I added a 1/2 second delay before disabling the button.
    See if that works for you. If not then I'm fresh out of ideas.

  • Using Java Script With Item Button

    Hi All,
    please i want to know how can i call any java script function from an item button?
    i cannot find the "Action When Button Clicked" tab which is exist in a region button.
    Thanks in advance,
    Ola

    Hi,
    i am having a strange problem with java script
    i have defined the following commandlink in an af:table
    <af:commandLink
    text="lockUser"
    disabled="#{!bindings.lockUser.enabled}"
    id="cl1"
    partialTriggers="cl1"
    action="#{searchBean.lockUser}">
    <af:clientListener method="onlock1" type="click"/>
    </af:commandLink>
    I have defined the following java script function.
    <f:facet name="metaContainer">
    <af:resource type="javascript" >
    function onlock1(){
    if(confirm("Do you want to cancel")){return true;}
    else {
    return false;}
    </af:resource>
    </f:facet>
    when i click on the link, the dialog box appears asking if i want to cancel: when i press yes still the link action is activated. Kindly suggest where i am going wrong.
    the behaviour i need is to if cliked on yes then the link action does not activate and nothing happens. if i press any other button the link functionality should be activated and it should perform the locking functionality

Maybe you are looking for