JavaScript: box always invalid after the page

Hello

In a region, I have a check box that must be disabled by default. After clicking on a button that applies a MRU/present (and verification of certain conditions) the box should switch to on.

What I did:
-The Javascript of the enableCheckbox() and disableCheckbox() functions are defined in the HTML page header (they work).
-In the foot of the region with the box I call the function disableCheckbox ('myCheckbox'); to get the default value.
-The optional URL redirection of the button says:
JavaScript:doSubmit('SUBMIT'); to submit
JavaScript:enableCheckbox('myCheckbox'); to activate the checkbox

The problem is that the box will switch on, because submit/reload the page to disable the checkbox through the foot of the region. Think of other solutions, I realized that each top up will set the default again...

How can that be resolved?
Thanks in advance,

Roger

Hi Roger,

You must have somewhere a logic that determines if the checkbox should be disabled/enabled.

Generally speaking, it would be the value of one or more fields and the box should be checked whenever the field related (s) is / are updated using the onchange event.

There are several ways to check for this, but the principles would be the same. For example:

function check()
{
 var x = document.getElementById("P1_PAGEITEM");
 var c = document.getElementById("P1_CHECKBOX");
 if (x.value == 'XXX')
 {
  c.disabled = false;
 }
 else
 {
  c.disabled = true;
 }
}

This function can be used on the page loading - by adding a call to it in Footer region region - and the attributes of the P1_PAGEITEM using:

onchange="javascript:check();"

Andy

Tags: Database

Similar Questions

  • My apple ID became invalid after the recent upgrade to ios 9.3

    My apple ID became invalid after the recent upgrade to ios 9.3. What can I do to reactivate the ID? I tried to reset my password several times even.

    For now, I am unable to pay for anything because I can't access the function of apple on the phone pay.

    Hello

    Follow the instructions here, include a link to get help from Apple with your Apple ID:

    If your identifier Apple is locked - Apple supports

  • HP ENVY 360 M6: Wfii adapter on new 360 M6 desire becomes invalid after the last critical update.

    The wireless adapter on my new laptop becomes invalid after the last critical update. Reboot / restart, diagnosis or troubleshoot cannot fix or repair. I was forced to do a restore to the date preceding the update. Adapter Ok now? This is a problem on other models?

    Hello

    Try this first

    Download and install the latest driver of wireless LAN adapter can solve common problems with wireless Internet. Follow these steps to use the Device Manager to find the latest WLAN driver:
  • whenever I open a page, a security box appears telling me the page contains elements safe and secure, that I want to display the non secure items?

    original title: problem pop up safety box

    A couple of months, my daughter opened a video on utube.  The screen on my laptop turned blue with white writing and the volume went crazy.  Had to hold the close button.  Since then, whenever I open a page, a security box appears telling me the page contains elements safe and secure, that I want to display the non secure items?  I used for the display of this box on occasion, now it is on each page.  I ran windows security and norton scans and both find nothing.  Anyone have any ideas on how to solve this problem, because it drives me crazy.  Thanks in advance

    Hello Michelle,.

    You have a virus, here's what you need to do. Download and install malwarebytes of: http://malwarebytes.org/products/malwarebytes_free, be sure to update before running a full scan. If you cannot run the program at all, you will need to download a few programs of this site: http://www.bleepingcomputer.com/combofix/how-to-use-combofix it, you should get back on track.

    Also, you may have a browser redirection problem. Go to your IE tools--> internet options--> Connections tab, then click lan setting and make sure that the only box to checked in it is automatically detect settings.

    Let me know if it works,

    Jim

  • JavaScript in JSPX and run after the page loads?

    I want to insert some JavaScript to my file jspx, but his does not work... I did this way:
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
              xmlns:trh="http://myfaces.apache.org/trinidad/html">
      <jsp:directive.page contentType="text/html;charset=UTF-8"/>
      <f:view locale="#{actionAvailable.userLocale}">
        <af:document id="d1" title="#{bindings.title.inputValue}">    
          <f:loadBundle basename="oracle.bpel.services.workflow.worklist.resources.worklist"
                        var="resources"/>
          <trh:script source="/jsLibs/taskDetails.js" id="s1"></trh:script>
    
        <!-- //I ADDED THIS -->
        <f:facet name="metaContainer">
            <af:group>
                <trh:script>
                   function myFunction()
                   {
                    alert("function called");
                   }
                </trh:script>
            </af:group>
        </f:facet>
        <!-- //END OF SCRIPT -->
    
    
        <!-- //I WANT TO RUN MY FUNCTION AFTER PAGE IS LOADED -->
          <BODY onload="myFunction();">
          <af:form id="f1" usesUpload="true">
            <af:panelGroupLayout layout="vertical" inlineStyle="padding:5px;"
                                 id="pgl5">
              <af:panelLabelAndMessage id="id12" label="">
                <af:goLink text="Click here" id="link"
                           destination="#{LinkCreator.link}#{bindings.taskNumber.inputValue}"
                           targetFrame="_self"/>
              </af:panelLabelAndMessage>
            </af:panelGroupLayout>
          </af:form>
          </BODY>
    
    
    
        </af:document>
      </f:view>
    </jsp:root>
    As you can see, I just very simple jspx file and all I want to do is to run myFunction() after loading the page.
    So I inserted a very simple script with 1 function that handles the simple alert (I followed this instructions http://adfcodebits.blogspot.com/2010/03/bit-3-adding-javascript-to-jspx-page.html).
    I also added BODY onLoad, but nothing happens...

    What's wrong?

    Published by: user1175491 on November 11, 2010 11:55

    Try this:



    function someFunction() {}
    Alert ("OnLoad");
    }


    you don't have to use the body tag

    Published by: Nikhil Gokhale on November 11, 2010 19:18

  • State of session always invalid after connection

    Hello community,
    I have a functional connection process that uses my connection with username and password. After connection I branch to start the application page, but now, this session is different from the connection start session, so each connection is invalid and will be branch to the authentication of invalid schema page.

    My login is url: f? p = 100:100:123456

    Once the connection is correct (I tested in the database with a large number of inserts into tmp_table)
    I want to the branch with the wwv_flow_custom_auth_std.login () of page 1000 standard connection procedure.

    The correct url is displayed in the browser, but the current page is the page of connection 100, because the session (I think) is not valid. In the authentication topic, invalid session page is set to page 100.
    I tested several pages and still this page is branched.
    So im shure, that session state is not always valid after login.

    But why?

    Someone at - it an idea?

    Thank you for responding.

    Frank

    For what it's worth, dbms_obfuscation_toolkit has been deprecated when 10.1 is out. dbms_crypto is the package supported in the future.

    Tyler Muth
    http://tylermuth.WordPress.com
    [Oracle security application: development of secure database and Middleware environments | http://www.amazon.com/gp/product/0071613706?ie=UTF8&tag=tylsblo-20&linkCode=as2&camp=1789&creative=9325&creativeASIN=0071613706]

  • confirm the dialog box and to redirect the page when a button is click

    Try to cancel a button would pop up a confirmation dialog box if ok redirect as 1 page (homepage)

    I tried to copy the code
    JavaScript:apex.confirm ("are you sure you want to cancel ', 'CANCEL'");

    but im having a hard time finding how to redirect the page.

    I guess you get the page shown.

    If so, then create a branch with a Condition where ask = CANCEL and go to the redirect page to. Make sure you to another branch does not exist with a lower sequence that would fire until this new branch may trigger.

    Be sure to mark answered questions if in fact they are.

    Published by: Bob37 on January 18, 2012 09:48

  • Always focus on the Page

    Hello
    Is it possible to always focus on an element, even if a Popup or a Validation error has occurred? I want the cursor to appear always in a particular item without having to click on the text box using the mouse for cursor to appear. Tried the onload using JS but does not keep a cursor on the point. Display attributes - update of the slider does not seem to do the trick either. F5 did not help Page has only 1 point.

    On the "page attributes:
    * On "display attributes" tab set the "Focus of the cursor" option for "don't wear is not the cursor.
    * In the tab 'HTML Body Attribute' in the field 'Page HTML Body attribute' enter something like: onload = "first_field ('PX_ITEM'); »

  • How can I stop Firefox displaying Javascript/CSS inline when viewing the Page (CTRL + U) Source?

    Recently, I noticed that the Javascript and CSS files are shown online while you watch a page source. Is there a way to stop the Firefox to do this?

    Thanks for the test.

    When I try Reddit, this stylesheet is not inline in the page.

    I can't access/browsing Netflix, I'm redirected to a login screen. But it seems strange that when I try to navigate around Netflix, I'm still on HTTPS and you load on HTTP.

    This problem happens only in the pages of HTTP and not HTTPS pages?

    Is it possible that some sort of proxy or security filter modifies the page until it reaches your browser?

  • Windows updates always installed after the return to a previous restore point?

    A restore point to bring victory 7professional. What will happen with the windows updates that came after the restore point?  Clicking on updates windows just always looking for updates, nothing happens. Updates are received before the restore point still installed?

    Windows update itself creates one in order to make them reversible. To resolve the issue, see updated:

    Windows 7 update problems? First read this.

    Best regards, VZ

  • Extension of JavaScript causing a reload of the page

    Hello

    I created an extension of fast, based on dialogue by Tim Neil spinner code I found here https://github.com/tneil/WebWorks/tree/master/api/ui/Spinner/src/blackberry/ui/spinner

    Now, I have a basic function that takes a string and returns in a callback. This will be modified later to take a path of the image and returns a string containing an image of the data encoded in base64.

    Including the html from the application and function extension containing a script below.

    My problem is that on the successful recall, my 'onLoad' fuction is called again.

    Is there anyway to stop this happenning. OR I'm doing something wrong.

    See you soon.

    
    
    
    
    
    
    Invoke Extension
    
    
    
    
    ///===================================================
    
    public final class FunctionTest extends ScriptableFunction {
        public static final String NAME = "myfunction";
        private ScriptableFunction _callback = null;
    
        public Object invoke(Object obj, Object[] args) throws Exception
        {
            if (args.length == 2) {
                String strPath = (String)args[0];
                // Now get the callback method to fire
                _callback = (ScriptableFunction)args[1];
    
                Object[] result = new Object[1];
                result[0] = strPath;
                // Create a final thread safe result to pass into the thread object
                final Object[] threadedResult = result;
                // Create a new thread to make sure that the invoke of the JavaScript callback
                // does not initiate from the UI thread.  This can otherwise cause a deadlock scenario
                new Thread () {
                    public void run() {
                        try
                        {
                            // Pass the result of the spinner back to the handle of the JavaScript callback
                            _callback.invoke(_callback, threadedResult);
                        }
                        catch (Exception e) {
                            throw new RuntimeException(e.getMessage());
                        }
                    }
                }.start();
    
            }
    
            return UNDEFINED;
    
        }
    

    Reloading is caused the href = "" in your anchor tag. " A href empty, the page reloads. Try to use a button to trigger your code instead:

  • Save as dialog box is empty after the document scanning

    After the digitization of documents, when I go to the file menu and save, the dialog box is empty.  It was only intermittent, now it's all the time.

    Hi johns18225944,

    Please try to uncheck the "Show when saving files from online storage" option in the Edit menu > Preferences > General.

    Click OK at the bottom to save the settings and then try to save the file.

    Let us know if it works.

    Kind regards

    Meenakshi

  • Can I do a box resize vertically as the page develops?

    I try to add a zone along the side of my page, running from top to bottom, with a gradient fill.  I want the box to expand, from top to bottom, as the page develops.  In other words, the home page is of a different length than the other pages, and I want that gradient to run all the way from the top to the bottom regardless of the page.  If I add a box and use a fill of grad, the box expand.  Any ideas on how to achieve this?  I have attached a screenshot for reference to screen.

    Thank you.Screen Shot 2015-12-25 at 3.31.41 PM.png

    There are different ways to do this.

    1. fill the background with a small, high gradient image, which is placed to the left.

    2. create a rectangle with a gradient inside, copy it and 'paste in place', while the two rectangles are placed one above the other. Pin one to the top left of rectangles and set the second as a footer item. If you resize the page, it will look like a single object that extends from the top down.

  • Conditional branch after the page

    Hi all

    I have a page where I have to present and process elements and page (insert and update the database) then branch to a specific page that the button has been pressed. I have 4 buttons and each button has to go to another page, each button must also submit page and process data (thanks to a process of Apex DML and passing 'SAVE' demand to each button). the problem I have is no matter what button I press the "app to the first domestic branches. I have 4 branches set to run after the process. Each branch should go to a different page depending on the button. In each branch I made the conditional branch based on the key.

    APEX seems to ignore the condition (in Debug) button it says unconditional, even if the button is definitely conditional.

    I'm under Apex 4.2.2

    It seems that when passing to a request to 'SAVE' Apex all the buttons to this request in the same way? Whatever the button has been activated?

    Any ideas or alternatives?

    Thank you

    Andrew

    Hi Andy,.

    I didn't know all of your buttons send the same request, so it is normal that your different branches spoil, because your process and your branches looks like demand that sends your button and not the label of your button. You will need to make sure that each gives a different request.

    Kind regards

    Joni

  • Hide filter interactive report dynamically after the page load

    Hello

    I try to hide the section of interactive report filters (hide/show the area with +/-sign on the top of the report) the loading of the page

    I have the reference to the thread after http://apex-at-work.blogspot.com/2011/02/hide-interactive-report-filter.html posted by Tobias Arnhold...

    According to the expert, all I have to do is post the following code the code JS "page loading" within a dynamic action...


    / * Hide filter IRR after page load * /.
    If ($('#apexir_CONTROLS_IMAGE').attr ("src") == ' / i/minus.gif ') {}
    gReport.toggle_controls ($x ('apexir_CONTROL_PANEL_CONTROL'));
    }

    I did, but apparently it does not work for me...

    I posted a sample on APEX. Oracle.com for review and comment

    Thank you

    Edited by: qwe12654 may 3, 2011 19:15

    Hello

    01. in the report Footer region put this

    
    

    * This will hide your filters, highlight conditions

    02. then Goto 'Report attributes' => 'Search Bar' => for 'Include search bar' select 'no '.
    * This will hide the full search bar (do this only if you want to hide this part)

    * If you get the answer then mark as 'Correct '.

Maybe you are looking for

  • 6 s iPhone: iOS 9.3.4 photography is not downloaded to iCloud

    Hi gang. I have a big problem with uploading photos to iCloud server. After you take the picture to automatically download the server to icloud. For the backup. Out of nowhere, this function has stopped working. What should do? I'm stuck and powerles

  • E - post migration

    I have hand bought a new lapptop. Two of my computers are upgraded to win10. In win10 I can't find the transfer file possibilities then I wonder how can I transfer my emails from the old to the new computer? Of course, both have Thunderbird e-mail pr

  • Partition too small BOOTCAMP?

    Hello world I have a small question about Boot Camp. Yesterday, I installed Boot Camp on a 500GB partition created with Boot Camp. I realized that on Windows, it says that my Windows disc is only 465 GB and even with the HARD of Macintosh disk that i

  • Wait on Flash Builder 4.5 and other stuff

    Initially, I wanted to ask a question, but after trying to find information on when FB 4.5 will be communicated, I came across a little information.  I hope someone rim reads this. Can anyone confirm if the final FB 4.5 will allow the use of design w

  • Customer remote VPN cannot ping certain IP

    My Cisco VPN client can establish the tunnel with my successful ASA5505 Office vpn but cannot ping some IP such as an internal server (10.100.194.6). FIREWALL-1 # ping 10.100.194.6Type to abort escape sequence.Send 5, echoes ICMP 100 bytes to 10.100.