Apex generating javascript to disable button onClick

I have navigational buttons in a region to go, for example, to the "Next" page.
APEX is including:
onClick="javascript:this.disabled=true;"
as part of the "Next" buttons attributes.
So that after the user clicks the "Next" button and goes to the next page,
if they click the browsers Back button, the "Next" button is indeed disabled.
The Next button is disabled in FireFox but remains enabled in IE. Thus causing
confusion for the user using FireFox.
So I'd like to have APEX not generate this javascript at all.
Is there a way to turn that off? Some switch on the page/region/button that I'm
not seeing?
Or is this just the old browser back button problem?
Thanks in advance.

I have processes that make calls to packages on the back-end so I don't know if importing it into the Oracle Apex hosted environment will work.
This may or may not help but these are the page by page steps I took in creating these buttons.
1- Click the "Create" button icon in the "Buttons" area in the "Page Rendering" column.
2- "Select a region for the button:" (Gave it an existing region to reside in).
3- Choose: "Create a button in a region position"
4- Give it a Name and a Label. Click "HTML Button". Leave the default "Submit Page and Redirect to URL".
5- Choose a Region Position, Sequence, Alignment (under "Button Attributes" is where I assigned it a style but NOT for this button).
6- Choose a page to branch to.
7- Click "Create button". (no display condition chosen if you clicked the Next button).
8- Run Page
9- View the Source
There it is:
<input type="BUTTON" value="Test" onClick="javascript:this.disabled=true; doSubmit('TEST');" >
and it also creates the Branch that redirects to the page I specified based on the buttons name (I think it uses name, still a little new to this).
so i dunno. 8-( Just wondered if that sequence of events seems normal.

Similar Messages

  • 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 create a disabled button without javascript

    Hi,
    I have to create a disabled button in apex 4, without using javascript due to some security reasons. I have edited the button template to give a disabled look, but still an action eg. submit is associated with it. I dont want any action to be performed on this button.
    Please suggest how can i achieve this or any alternative approach.
    Regards,
    Shweta

    Shweta wrote:
    Hi,
    I have to create a disabled button in apex 4You ALWAYS need to supply the following information with the initial question:
    <li>Full APEX version
    <li>Full DB version and edition
    <li>Web server architecture (EPG, OHS or APEX listener)
    <li>Browser(s)/versions(s) used
    <li>Theme
    <li>Templates
    <li>Region type
    without using javascript due to some security reasons.Why? What "security reasons"?
    I have edited the button template to give a disabled look, but still an action eg. submit is associated with it. I dont want any action to be performed on this button.
    Please suggest how can i achieve this or any alternative approach.If no action can be performed on the button, why is it there? Don't render it all.

  • Disabled button generates events

    Hello,
    I have a radio button that I want to disable while a background process is running.
    After the process finishes, I enable the button again.
    However, if the user clicks on the disabled button during the background process, an ActionEvent still gets generated.
    Then when the button is re-enabled, it responds to the event that was generated while it was disabled. I want to prevent my button from responding to events generated while it was disabled.
    I do not want to use the getGlassPane.setVisible(true) technique because I still want my cancel button to be able to generate events during the background process.
    I am using JDK 1.3.1 and my button is in a panel contained in a JFrame application.
    Suggestions?
    Thank you,
    Ted Hill

    Hello,
    I have a radio button that I want to disable while a background process is running.
    After the process finishes, I enable the button again.
    However, if the user clicks on the disabled button during the background process, an ActionEvent still gets generated.
    Then when the button is re-enabled, it responds to the event that was generated while it was disabled. I want to prevent my button from responding to events generated while it was disabled.
    I do not want to use the getGlassPane.setVisible(true) technique because I still want my cancel button to be able to generate events during the background process.
    I am using JDK 1.3.1 and my button is in a panel contained in a JFrame application.
    Suggestions?
    Thank you,
    Ted Hill

  • Disabled buttons still generate events

    It seems that disabled buttons still generate events in business one. If a button is disabled (even a standard one) click events can still be seen in the SBO event logger. I would have expected a disabled button to be completely disabled and no events to be generated whereas as it is I have to check in the event handler to see if the button is enabled or not.
    Is my understanding of this correct?
    Has anyone else had issues like this?
    Gordon Wood

    Hi Gordon,
    That sounds like an issue with the SBO Event Logger because no event is actually triggered in the addon when the button is disabled.
    Kind Regards,
    Owen

  • Javascript firing on disabled button also

    Experts,
    I have a button which has a clientListener who fires a javascript. The js disables the button. So far its good, but the issue happens if the user clicks on the disabled button the js fires again.
    <af:commandToolbarButton text="Update Profile" id="ctbUpdate"
                                           actionListener="#{viewScope.CustomerProfilePageBean.toggleButton}"
                                           binding="#{viewScope.CustomerProfilePageBean.updateButton}">
                    <af:clientListener method="toggleSplitter" type="click"/>
                  </af:commandToolbarButton>Isnt this strange ?
    thnks
    Jdev 11.1.1.5

    It is not strange but stupid...
    Also happens when using af:showPopupBehaviour with type="click"...
    I would like to know where is it useful to work like this???
    Try using type="action" on af:clientListener, it works for af:showPopUpBehaviour...

  • Disabling buttons in Netscape

    I have a problem in disabling the buttons in netscape 6.2. It works fine in IE but not in netscape.
    Scenario: I have two buttons. One is the Agree button and the other is the Disagree button. The Agree button redirects the page to another page while the Disagree button just closes the window. I also want to disable both buttons when I pressed the I Agree button. Here are the code that I used in disabling the button.
    <input type="button" name="agree" onClick="this.disable=true;cancel.disable=true;nextwin()">
    <input type="button" name="cancel" onClick="window.parent.close()">
    Note: I also tried using javascript in disabling the button in netscape 6.2 but to no avail
    I don't know if this is the right forum for my question but I hope that you could help... thanks

    Excuse me but I have to disappoint you. Netscape doesn't do this. The best thing you can do is to disallow the focus with a javascript. Something like this:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
      <title>Disable...</title>
      <script>
        function disable(elem) {
          self.status='Disabling ' + elem.value;
          elem.onfocus=dis;
          elem.onclick=dis;
          elem.enabled=false;
        function enable(elem) {
          self.status='Enabling ' + elem.value;
          elem.onfocus=null;
          elem.onclick=null;
          elem.enabled=true;
        function toggle(elem) {
          if (elem.enabled==null) elem.enabled=true;
          if (elem.enabled) disable(elem); else enable(elem);
        function dis() {
          document.forms[0].elements[1].focus();
          return false;
      </script>
    </head>
    <body>
    <form>
      <input type="submit" name="submit" value="SUBMIT"/>
      <input type="checkbox" name="enable" checked
         onClick="toggle(document.forms[0].elements[0]); return true;">enable</input>                  
    </form>
    </body>
    </html>Ugly, but works. If your button is a picture you can switch between the enabled/disabled picture in the toggle() function. You cannot change the background or the text color of a button in Netscape.
    Hope it helps,
    Anton

  • IE8 and javascript - Back/Forward button in Robohelp

    I am using Robohelp 7. I use the following script for my Back button - javascript:history.back(1);
    This works fine in FireFox and IE7, but not in IE8. Has anyone found a solution for javascript issues in IE8?
    Thanks,
    Deborah

    1) We (one of the programmers and I) tried this code in a "clean" IE8 environment and all three buttons worked:
    <
    html><
    head><
    title>Test Html</title></
    head><
    body>
    <input type='button' value="history.back(1)" onclick="javascript:history.back(1);" />
    <input type='button' value="history.go(-1)" onclick="javascript:history.go(-1);" />
    <input type='button' value="history.back()" onclick="javascript:history.back();" />
    </
    body>  
    </
    html>
    2) The button is in the Robohelp toolbar.
    3) This is the Robohelp code that generates the HTML:
    addButton("custom17587",BTN_TEXT|BTN_IMG,"Back","","javascript:history.back(1);  ","","",0,0,"backbuttonon.gif","backbuttonon.gif","","backbuttonon.gif","","");
    4) This is the HTML code that Robohelp generates for the Back button:
    The code that run is :
    <TBODY>
    <TR>
    <TD onmouseup="onBtnMouseUp(event, 4);" class=clsBtnNormal onmouseover="onBtnMouseOver(event, 4);" onmouseout="onBtnMouseOut(event, 4);" onmousedown="onBtnMouseDown(event, 4);" onclick="onBtnClick(event);return false;" vAlign=center noWrap align=middle><A id=btncustom17587 class=btncustom17587 onmouseover=cusOnMouseOver(0); title=Back onclick="cusOnClick(0);return false;" href="javascript:void(0);"><IMG border=0 alt=Back align=absMiddle src="http://localhost:8080/jserf/help/en_US/PortalHelp/backbuttonon.gif"> Back</A></TD>
    5) We tried all three options from #1 above in the Robohelp code (#4 above) and none of them worked in IE8.

  • How to disable Buttons based on condition.

    Hi
    Need your help to disable button based on condition.
    Please refer the application:
    http://apex.oracle.com/pls/otn/f?p=34797:5:110582943383419::NO:::
    login credentials:
    workspace: vsanthanam
    user: vijay
    pswd: apex_demo
    In the above application, i have 2 buttons in page 5, (Report1 and Report2)
    Where i have to disable button based on the following conditon:
    i) USER whoever has Admin value 'Y' in my table can access the button.
    for this i've written a Button Condition : Type (EXISTS)
    select 1 from apex_extra_values where rtrim(lower(empname)) like decode((select Admin from apex_extra_values
    where rtrim(lower(empname))=rtrim(lower(V('APP_USER')))),'Y',rtrim(lower(V('APP_USER'))))
    note: i have empname same as my APEx user name. with Admin access 'Y'.
    By using this code i can able to hide the button for users who has no Admin access.
    But my requirement is : i have to show the button even if the user is not Admin, but to grey out (disable the button - no action)
    I tried using javascript function:
    function disableButton(pThis)
    pThis.disabled=true;
    But either of this (exists condtion or JAvascript function) works in my case and not both.
    Any pointer on this would be highlt appreciated.
    Thanks
    Vijay

    Couple of things:
    1. I would never use v('APP_ITEM') but :APP_ITEM - it is faster and there is no need to use this function within an application
    2. The way you are doing this check is not the best approach. You should create an authorization schema and run this once per session. Whatever this authorization is returning as a result you can check using the following Function returning boolean:
    IF apex_util.public_check_authorization ('MY_AUTH') THEN RETURN TRUE; ELSE RETURN FALSE; END IF;
    See this example on authorization issues:
    http://apex.oracle.com/pls/otn/f?p=31517:148
    3. As far as disabling a button is concerned I think I explained the options. I also have an example on that here:
    http://apex.oracle.com/pls/otn/f?p=31517:143
    whereby it is not disabling but hiding a button.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Disabled button after redirect

    I have created a page with a region button on it. The button has a redirect to a URL which runs a pl/sql procedure.
    After clicking the button, the procedure runs and I see my original page, but, the button is disabled.
    When I look at the page source, I see that the button has the attribute:
    onClick="javascript: this.disabled=true;"
    How can I keep the button from being disabled?
    Thanks for this wonderful forum.
    Cy

    Thanks for the reply,
    I actually tried that first. The problem is that I need the procedure to download a custom CSV file. It works with a redirect to a url. I could not make it work from a page process. There are several threads and a how-to about downloading a csv file. Nothing helped me get it to work from a page process.
    My whole application revolves around the user selecting some items from a report and clicking a button to get a custom csv built and downloaded. The csv has too many columns to be a report download and the columns may be too wide.
    Thanks again,
    Cy

  • Conditionally Disable Button

    I read this thread
    Howto disable a button within APEX?
    to conditionally disable a button in a form. And it worked as per the suggestion of user FFS.
    But I want to do something similar to a button showing in a report region. There are different conditions which will show the button in the disabled mode.
    When I tried to repeat the same steps as per the above thread(user FFS comments), I couldn't create a hidden item that will come after the button I want to disable.
    I also wrote this in the page's html header section:
    <script language="JavaScript" type="text/javascript">
    if ($x('P13_EMP').value >'0')
      $x_DisableItem('SAVE');
    </script>Did not disable the button either.
    Please help.
    Using apex3.2, it is an HTML button.
    Thanks,
    RN
    Edited by: RN on Jul 20, 2011 4:05 PM

    I normally just jQuery to disable buttons. See the first response: http://stackoverflow.com/questions/577548/how-can-i-disable-a-button-in-a-jquery-dialog-from-a-function
    I think $x_DisableItem probably isn't working for you because its not an Item. You can create buttons as region buttons or as items (if I recall correctly).
    If you don't have jquery/want to load it it should be able to still do it.
    (untested code, but something to the effect):
    i.e.
    var els = document.getElementsByTagName('input');
    for (i=0;i<els.length;i++){
      if (els.type == 'button'){
    if (els[i].value == 'LABEL'){
    els[i].setAttribute('disabled', true);
    } Someone else might have a more elegant solution ;-)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Read-only textbox and/or disable buttons in Infopath 2013

    In a InfoPath 2013 custom list form, my requirement is to make textboxes read-only, disable buttons, and/or create new buttons so users can not update fields in a custom list once the user has updated data in the list. Basically after the user hits the 'save'
    button so that the data is saved.
    The requirement is not to set up custom permissions since my SharePoint administrator said I should find another option. This administrator said he does not see a reason for only an 'add' permission.
    Thus can you tell me how to meet my requirements? Can you show me screen prints, pictures, or urls on how to solve the problem?

    Hi,
    According to your description, you might want to prevent users from editing the existing items.
    There are two workarounds I can provide as below:
    As the first workaround, you can remove Ribbon from SharePoint InfoPath List Form via modifying the OOTB settings of InfoPath Web Part.
    Here is a link about more details, you can use it as a reference:
    http://the-north.com/sharepoint/post/Remove-Ribbon-from-SharePoint-InfoPath-List-Form
    As the second workaround, you can apply the CSS code below to your page, it will hide the “Edit Item” button in the Ribbon:
    <style type="text/css">
    #Ribbon\.ListItem\.Manage\.EditProperties-Large{display: none !important;}
    </style>
    About how to add JavaScript/CSS into SharePoint page:
    http://blog.cloudshare.com/2012/10/29/how-to-insert-custom-javascript-code-in-sharepoint-2013-pages-part-i/
    Best regards
    Patrick Liang
    TechNet Community Support

  • Mapping Javascript Text to Buttons Automatically

    I know how to throw javascript into individual buttons in Acrobat.  However, we are generating a document with thousands of buttons, most of which will have similar javascript and will behave similarly (e.g. clicking on a button will open to a different page view, perhaps in another document in the same folder.)  I would like to be able to write the javascript text for each button using a VB macro to create a txt file for each button.  I know how to do this also. 
    What I do not know how to do, or even know if it is possible is to automate a process of tying the respective javascript that was generated in the txt files to buttons.  I assume the easiest way to do it is use a naming convention for each button that mimics the naming convention for my txt files.  This will allow for each button to identify with the text within it's respective txt file.  That leaves only one problem:  Finding a way to automate the transfer from each txt file to each button's javascript.  Can I write a script to do this?  If so, what is the best platform?  Can I do that with Javascript inside Acrobat?  I'm guessing that I can, but I'm so new to javascript that I'm not sure how to go about doing it.  fyi, i've written alot of vb code, which isn't the same, but at least i have a decent amount of code experience...i just need to learn javascript syntax and pdf structure. One last question:  Might it be possible and maybe even easier to insert the javascript from an external source like a VB program using the Adobe SDK?  Can the SDK do that?  I've messed with the SDK before and it appeared to have very limited operability on PDF's.

    Thanks to everyone who has helped me learn this stuff.  I've been looking at the pages and references that you have given me so far.  Now I can manipulate PDF with VBA code written in excel.  It's very similar to the scrips shown for a standalone VB program, just some differences in document declaraion (particularly in using objects).   I've noticed in the VBA (excel) script i can't get the "props" of an existing annotation, but I can for one that I'm just creating....
    'Defining Stuff, I have alot more variables but I'm just showing the ones pertinent to my quandry.
    Dim acroannotation As Acrobat.AcroPDAnnot
    Dim props As Variant
    Dim myAnnot As Object
    'This works:
    Set myAnnot = jso.AddAnnot
    Set props = myAnnot.getProps
    'This doesn't:
    Set acroannotation = Acropage.GetAnnot(1)
    Set myAnnot = acroannotation
    Set props = myAnnot.getProps
    I noticed in the SDK, the examples show props being defined as an object just like 'myAnnot.'  However, at the end of the VB tutorial, it indicates that I should use variant for most JSObject references.  That doesn't really matter.  What does matter is that I can't figure out how to get the 'props' object from an existing annotation.  Am I doing something wrong in trying to reference it?  It gives me the ole' Runtime Error 438: Object does not support this property or method, which usually means a type mismatch.  I also tried "Set props = acroannotation.getProps", thinking that actually referencing the Annotation object instead of the "Object" object, but I still got the same error.
    Finally, when I do figure out how to getProps for an existing annotation (the annotation is a button by the way, but I don't think that matters), I still have yet to find any reference as to how to use the "setAction" method for a button through the JSObject.
    Thanks for any input on the matter.

  • APEX generating double quotes in queries

    When APEX generates a query, it puts double quotes around the database objects.
    For instance when it uploads Oracle forms xml or when you are making a query in the query builder of the SQL workshop.
    Personally I don't like it. Because of the case sensitivity.
    Maybe I am old school, but I prefer the database object names being stored in uppercase in the database.
    Does anyone know if there is an APEX setting (APEX default, Application Builder default, Developer preference, etc...) that would disable the adding of the double quotes?
    If not, would this be a good suggestion as an improvement?
    Regards,
    Mathieu

    Hi
    I agree with this wholeheartedly. I can think of a few instances where it could be handy but, in general, I don't like it at all.
    I wouldn't suggest that the default is changed, merely that we have the option to change it (I'm not aware of a way to do this).
    Cheers
    Ben

  • Disable Button After First Click

    I have a button with PPR attached to it that generates a BI Publisher report within an OAF page. The report is correctly generated upon clicking the button. I also have SPEL defined for the DISABLED property of the button such that it can only be clicked once. I have done this via the suggested propertiesVO. For troubleshooting purposes, the button's disabled property is correctly being set after the first click as long as the BIP report is not generated as part of the process. However, once I put in the code for the BIP report (output is PDF), the button is no longer being disabled after the first click.
    Is control transferred in such a way that the PPR is NOT being executed?
    If I remove the code that writes the PDF to the servlet as defined by several posts and online references, the button is disabled as expected. However, once the code is put back in for the document to be generated, PPR stops working for the button.
    To summarize, each component works separately:
    1) SPEL for the disabled property of a button works as expected. After the first click, the button is disabled
    2) The BIP report (PDF) is correctly generated by the button
    3) If both the SPEL is used in conjunction with the PDF document generation process, the button is no longer disabled after the first click
    Please advise.
    Regards,
    LC

    Suggestions?

Maybe you are looking for

  • Can I turn the screen while browsing the web ?

    Can I set the screen to display the web longways as aposed to narrrow ways ? It would just make some pages look better. N96-1 + 8G SD~Software Version 30.033~Software Version Date 18-06-09~Type RM-247~P/C 0543713~T Mobile UK

  • Drag and Drop issue

    Hi guys, I hope someone can assist me with this. While not paying enough attention I dropped an AI file into Muse, yes, not smart. I was suprised Muse didnt reject the drop, but now I seem to have no way to stop Muse uploading the file. I have also c

  • Is it possible to import html files and export them as scorm?

    Hi, is it possible to import html files (like a website) and export them as a SCORM compatible ZIP file? Thanks!

  • Interface and conversion testing of SAP environments with Master Data

    Hi guy's Please let me know if some one of you know about SAP Conversion Project. Below you have more description: - testing of Interfaces from Legacy Systems - testing of conversion programs used in the conversion or transposition of data from legac

  • Java or JAVA ?

    How should the all java technology be refered to, say in promotional writings and so: Java or JAVA?