Set the element hidden in Javascript

Hello

I'll have a hidden page P4_SELECT element in my page. I'm putting this article on the page with a javascript function value.
 function getTheCurrentRow(triggerItem){   
    alert( triggerItem.slice(6));
   document.getelementbyid(P4_SELECT).value=triggerItem.slice(6);    

// $x(P4_SELECT).value=triggerItem.slice(6); 
   
}
</script>
Even if I get the value in the "Undefined P4_SELECT" javascript error alert

When I checked the 'view Source' of the page is to have this line in
<input type="hidden" name="p_t04" value="" id="P4_SELECT"  />
I tried
 $x(P4_SELECT).value=triggerItem.slice(6);
But getting the same result only. We cannot set values of the element hidden by Javascript.


Kind regards
Jyothi

Hello

If you're on Apex 3.x or higher, try

function getTheCurrentRow(triggerItem){   

 alert( triggerItem.slice(6));
 $s("P4_SELECT", triggerItem.slice(6));    

 /* Alert hidden item value you did set */
 alert($v("P4_SELECT"));

}

Here is the link to the Apex JavaScript API document where you can find the functions $s and $v I used
http://download.Oracle.com/docs/CD/E14373_01/apirefs.32/e13369/javascript_api.htm#CDEEIGFH

Kind regards
Jari

Tags: Database

Similar Questions

  • Set the value hidden with dynamic action

    This is probably very simple, but I don't know exactly what I'm doing wrong.  I would like to use a dynamic action to set the value of an item hidden in the value of a selection list when that select list of changes.  So what I have is:

    Event: change

    Selection type: point

    Article: P1_SELECT

    Action: Set

    Set type: PL/SQL Expression

    PL / SQL: P1_SELECT

    Items concerned:

    Selection type: point

    Point: P1_HIDDEN

    where P1_SELECT is my list selection and the P1_HIDDEN is my element hidden.

    It doesn't seem to work.  I don't know that I'm doing something very simple, bad.  This should be easy points for someone!

    Thank you!

    John

    It's actually a session typical State missunderstanding. When the selection list is changed, it does not change the value of session state, but only the value of the side (browser) client. If you set value action will set the status value for current session on the element hidden, which will probably be NULL (or any value it is on, you can see in the session tab in the developer bar).

    Instead of a type of expression plsql for your set value action, must change to a javascript expression:

    $v ("P1_SELECT")

    who will get the value of the element of page P1_SELECT currently on the page.

    PS: also, in your affected items your article is ": P1_HIDDEN"-is two points in front of deliberate? It shouldn't be there

    PS2: If you mean to send the page, then you can set the property to 'protect the value' of the hidden element to 'No', otherwise you will receive a checksum error!

  • enhance the element hidden by the name of the element

    Hi, we are trying to integrate at the request of payment of Braintree by their SUMMIT.

    Braintree javascript renders the element hidden following the loading of the page. The documentation says that this field is updated with a value when the form is submitted.

    < input type = "hidden" name = "payment_method_nonce" value = "" >

    How can I retrieve the value of this field by using a PL/SQL after submit processes?

    Thank you

    Simon

    Hi just to let you know that we managed to solve this problem. You got us on the right track - it turned out that present before the Page was too early to make a call to get the item, but a custom dynamic action beforeunload. I'm yet to understand if there are flaws to this way but we ca certainly get the value in a page element now

    Thanks again for your help

  • default value for the element hidden and fill the query

    Hello.

    1.-) I got a page that contains 2 parts, lets say: (HTML text) master and a detail (editable tabular report)

    in my tabular form, I had a hidden element that must take the value of the main form. How can I do this?



    (- 2) I call you a form to another form, sending a couple of fields as a settings link. the second form is called as expected, but I need that records on the second form that correspond to the settings appear. How do I get there?



    Thank you

    (new to apex)

    Hello

    The value of the source of the item hidden in the Tablur form to return the value of the master shape. Fundamentally change the Data Source to the article Page and specify the name of the element under the element of value. One thing you should keep in mind that when the page is submitted that reflects the value of the target element.

    If you want the value to be changed immediately when the value is changed in the main form, and then you create a dynamic Action with javascript code to change the value.

    Your second query is not clear, can you please provide any additional information.

    Thank you
    Sirot

  • Select the element hidden with ajax

    I need set the value of an item hidden on my page of in a javascript function, without submitting the page. I think that the best way to do it is using AJAX. After doing some research on this forum I came up with the code below, which doesn't seem to work. It's probably not that simple, but it is the code (in a javascript function):


    function setItem (imgid) {}
    document.getElementById("P186_IMAGE_ID").value = imgid;
    }

    It does not work. What Miss me?

    I can do:

    $x('P186_IMAGE_ID').value = "test";
    doSubmit();

    but that submits the page and I don't want to send the page.

    Thanks in advance!

    John

    Try this function in the header HTML of the page with the hidden item...

    Thank you

    Tony Miller
    Webster, TX

    What happens if you were really stalking a paranoid schizophrenic... They would know?

  • Introduce the elements hidden at the start of the APP

    Hi all

    I have trouble to set up an item hidden on startup APP. This particular application have connection and start with page 1.

    I would like to start the application by providing the value for one of my hidden point.

    http://www.mysite.com/apex/f?p=111:1:.:P1_GAME_ID:1: does not work.

    Do you have any suggestions?

    Thank you very much.

    Andrei

    Hi Andrei,

    In your URL, there is a period where there should be a colon.  The URL string below should work if there was an open site but I do not see the server recognizes.

    http://www.mysite.com/Apex/f?p=111:1:P1_GAME_ID:1

    The f

  • How to remove the elements hidden in PDF format

    Hello

    We use Acrobat 11 on Win7 Pro machine. We try to remove the hidden elements of a PDF file, we created.

    Using the image/text editing control we usually change the view to page view mode 2 can then select hidden items and delete them. We do not see the items in the display of the 2 page, but clicking and dragging in the "empty space" in the document, choose which then allows us to manipulate them. These elements are not visible when you view the PDF file normally.

    This time, we have a PDF file where we cannot select an image. We know that it is there, because when you try to trim the visible content, the hidden element is shown:

    crop.jpg

    We want to remove the bars of color at the bottom of the page. Can anyone help us with this, please?

    Thank you!

    I usually use the content pane for this - arrow down through content items and delete the ones I don't want. Not sure that this is the most effective way, just something that I found that works for me. I always work with a copy of the PDF file in case something goes wrong.

    a 'C' student

  • Link to page with LOV cascading don't set the element LOV

    I have a page with two elements LOV DB and TABLE. The TABLE is set cascading to the DB. These elements to work on the page very well. The problem is that if I connect to this page for an interactive report on another page, only the point DB prepares while ARRAY elements by default on the first item in the list instead of what I spend.

    URL of the link:

    http:// < servername >/apex/f? p = 101:376: < ID >:no:RIR:P376_DB, P376_TABLE:audit, Pub. ScanEvent

    With the help of Apex 4.0.

    Hello

    Rob Farver says:
    I have a page with two elements LOV DB and TABLE. The TABLE is set cascading to the DB. These elements to work on the page very well. The problem is that if I connect to this page for an interactive report on another page, only the point DB prepares while ARRAY elements by default on the first item in the list instead of what I spend.

    URL of the link:

    http:// /apex/f? p = 101:376:: No.: RIR:P376_DB, P376_TABLE:audit, PUB. ScanEvent

    With the help of Apex 4.0.

  • You must pass values of 'return' of item selection list while trying to assign the value via a URL. Make sure the audit and PUB. ScanEvent are the correct return values
  • Make sure that the child value is good for the selected parent value. that is, the table PUB. ScanEvent must be a child value for DB audit. If you pass an incorrect combination of parent-child of the values that have been created as cascading, only the parent value is defined.

    Kind regards
    Hari

  • Set the element property in the detail block

    Hello

    I wish to address an item property in my block of detail that consists of several documents as a tabular presentation. For example, when I use APIs like the code below. The API defined the entire column for this particular element rather than the game each element in each record. Could you please take a look below coding and advisor how I can configure each element in each record?


    -----------------------------------------------------------------------
    BEGIN


    GO_BLOCK ('USER_RESP');

    last_record;
    premier_enregistrement;
    LOOP

    If: USER_RESP. End_date is null then
    -app_item_property.set_property ('USER_RESP.) END_DATE ', ALTERABLE_PLUS, PROPERTY_OFF);
    set_item_property('USER_RESP.) END_DATE ', INSERT_ALLOWED, PROPERTY_OFF);
    set_item_property('USER_RESP.) END_DATE ', UPDATE_ALLOWED, PROPERTY_OFF);
    end if;

    When the output: system.last_record = "TRUE";
    next_record;
    END LOOP;
    premier_enregistrement;




    END;

    --------------------------------------------------------------------------------

    Published by: user11270809 on January 12, 2010 18:15

    Hello
    better do you in pre-record trigger

    If: USER_RESP. End_date is null then
    SET_ITEM_INSTANCE_PROPERTY('USER_RESP.) END_DATE ', CURRENT_RECORD, UPDATE_ALLOWED, PROPERTY_FALSE);

    on the other
    SET_ITEM_INSTANCE_PROPERTY('USER_RESP.) End_date ', CURRENT_RECORD, UPDATE_ALLOWED, PROPERTY_true);
    end if;

    Published by: amitphynyl on January 12, 2010 23:19

  • Send the value of the element to IR flash chart

    Hello developers,
    I have a way to query.
    On a page, I have 2 parts: a flash chart, a single interactive report and a hidden element attached to the chart area. When the user clicks on flash graphic, the IR must have a filter automatically set as IR_COLUMN = VALUE. So I put in action link to go to the same page and fixed in article IR_COLUMN and the value "& P_HIDDEN_ITEM.". Surprise, value is not passed, on the contrary if I use: APP_ID. or another string of standard substitution or #VALUE # #MAX_VALUE # the value or it passes. Note that I don't want to send all the values in the chart. I also try to put a substitution string to properties of the Application and try to pass the value but still does not work. I use APEX 4.0.2.
    Thank you.

    Hi "user11978562"

    You mention that you have attempted to reference your item hidden in the field 'Value' in the region of action link. The entry of the names of elements in this area is not supported, and the value of this element will not be retrieved or used in the URL. Depending on the type of graph, a set list of substitution strings are accepted for example #LABEL #, and also the references to the FLOW_ID APP_ID, SESSION, are managed. If you want to reference the element hidden, then you could update your graphic to include the link, similar to the following query:

    SELECT 'f?p=&APP_ID.:2:&SESSION.:IR_REPORT_12345678:&DEBUG.:RIR,CIR:IR_JOB:&P2_HIDDEN_JOB_ITEM.' LINK,
           ENAME LABEL,
           SAL VALUE
    FROM   EMP
    ORDER  BY ENAME
    

    .. where the link includes a reference to page 2, the same page as my graphic and interactive report; demand IR_REPORT_12345678 identify my interactive report; the interactive report for WORK column, IR_JOBfilter; and a reference to my article on hidden page P2_HIDDEN_JOB_ITEM. Just ensure that your hidden item has a value in session state, and then by clicking on an element of your theme astral should define the IR filter. If you do not want to go to the IR filter of the column, instead of referencing an element hidden, then you could do just a graphical query value replace the reference to the element hidden by a column reference, similar to the following:

    SELECT 'f?p=&APP_ID.:2:&SESSION.:IR_REPORT_12345678:&DEBUG.:RIR,CIR:IR_JOB:'||JOB' LINK,
           ENAME LABEL,
           SAL VALUE
    FROM   EMP
    ORDER  BY ENAME
    

    .. where I added a reference to the JOB column in the column of the query LINK.

    In response to your comment that you tried to "+ set a string substitution to properties of the Application and try to change the value, but did not always work +", only a defined set of chains of substitution are accepted for graphics, and they are referenced using item-level associated with the 'value' point on the action link region.

    I hope this helps.

    Kind regards
    Hilary

  • Apex. Submit in javascript do not set a value for the element

    Hi all
    I work with Application Express 4.1.1.00.23.

    I am trying to use this
    apex.submit({request:parRequest,set:{'P30_SELECTED_ROW_ID':parID},showWait:true});
    in order to assign a different value to P30_SELECTED_ROW_ID, and depending on demand, run the processes corresponding, but even if the beginning of the process correctly the value of the element sucks.

    I also try to call the apex.submit using a javascript function to check the parameters passed and the value of Thierry is correct and NON NULL .

    Thanks in advance for any help or suggestion.
    Alex

    Hello

    article P1_SELECTED_ROW_ID is about to "view only".
    If you replace this 'hidden' and unprotected, it should work.

    But because of the check constraint DEMO_CUST_CREDIT_LIMIT_MAX credit_limit<= 5000="" there="" will="" be="" an="" error="">

    Good luck, Erik-jan

  • Cannot set attribute of the param element value using javascript in setAttribute

    When adding the items param via createFragment the javascript in setAttribute function does not set the "value" attribute It is necessary to set the nodetext to add this attribute to the value of the param element.

    Second, when using the method of the generated html code defines the 'value' to the innerHTML. HTML code resulting in the display by "Inspect the system" looks like this.

    < parameter id = "myID" > myValue < / param >

    Note: [the element close text < / param > is displayed correctly using inspect, but when using file-> SavePageAs the end text is not saved correctly.] I reported this in another question of moz. support FF.]

    function setparamAttrs (parmID, parmVal)
    {

    var gData = document.createDocumentFragment();
    
     var newNode = document.createElement("param");
     var textStr = document.createTextNode(parmVal);
     newNode.appendChild(textStr);
    
     newNode.setAttribute("id", parmID);
     //newNode.setAttribute("value", parmVal);  // this does not work
     //newNode.setAttribute("innerHTML", parmVal);  //this does not work
    
     gData.appendChild(newNode);
     document.body.appendChild(gData);
    

    }

    However, I was able to retrieve the "value", once it has been added using:

    var val = document.getElementById("parm0").value;)

    getAttribute ("value") does not work either.

    Finally, I added the param elements to my HTML code like this.
    < parameter id = "myID" > myValue < / param >. Then I tried to extract the value using document.getElementById("myID").innerHTML. No text has been returned. When I looked at the HTML document with inspect my HTML param element is displayed as < param id = "myID" > myVal. The closing text of the element has not the same when I use SavePageAs which I mentioned previously.

    Yes, this is the correct way to this code and it works for me without any problem.

  • Set a value of the element of the Page in Javascript

    I've created two elements on the page P9_DEVELOPMENT & P9_DEPARTMENT. The two select lists that are inspired by the shared components and in the sections of the list of the value of the properties display Null = Yes and Null = text "- Select -".

    I want each selection list for mutually is when I select P9_DEVELOPMENT P9_DEPARTMENT is back 'Sélection' - and vice versa. I wrote a function javascript with the following assignment.

    switch (pItem)
    {
    case 'P14_DEVELOPMENT ':
    $x('P14_DEPARTMENT').value = "- select -";
    break; …

    Logic sets the value of "P14_DEPARTMENT" empty, but I do not see "- select -". I get the same result with the statement
    $x('P14_DEPARTMENT').value = null;

    How can I reset the value of P14_DEPARTMENT and then displays the default "- select -"?

    Ned

    If the "- Select -" is the first option in the list select below the statement defines the list select Show "- Select -"

    $x('P14_DEPARTMENT').selectedIndex = 0;

    CITY

  • Interactive report with display of the icon to set the page element

    Hi all

    I am currently using Apex 4.2.4, I have an interactive report using icons, each icon has a link to another page but a few I want to set a value in a page hidden in the same page element which is then used as a variable for a classic report.

    I have this work via link href in the icon as f? p ='|| FA.page |': 1 :'|| : app_session |': P10_ID_ITEM :'|| FA.link_name without error.

    My problem is that I wanted to put the value of the element without using a link href that I could handle the clicked icon to change the background color so that the user can have a Visual representation, where it was clicked, then using the value of the page item appears the classic report in another region with a partial refresh.

    Any help is appreciated, thanks.

    Can you provide a detailed explanation of the purpose of this report and the logic used in the report query? What are the rules to control which icons appear in the IR, what icons link to the second report on the page of IR, and icons to link to separate pages?

    For me, the report query seems too complicated and inefficient by returning the data it does, and if another level of data is added to the hierarchy or more data is added to the second level, it fails with:

    ORA-01427: einreihig subquery returns multiple rows

    I'm guessing that the intent is that the IR displays only the icons at the top level of the hierarchy and icons for posting a link to a different page when they have no descendants, or to display the related lines in the secondary report below the IR when they do. I created a new page with the report query modified to a route of tree and keep the upper level lines. It is much more effective than the original query and simplifies the logic necessary for the verification of end-nodes. Instead of generating a URL link (which violates the separation of concerns), the query returns of the discrete values that can be used to implement the HTML link in the Icon View link Custom property:

    with icon_tree as (
          select
              ic.id_icon
            , ic.icon_name
            , ic.link_name
            , nullif(connect_by_isleaf, 1) is_parent
            , level depth
          from
              icons ic
                connect by
                    prior ic.link_name = ic.id_parent
                start with
                    ic.id_parent is null)
    select
        id_icon
      , icon_name
      , link_name
      , apex_util.get_blob_file_src('P10_ICON_IMAGE', id_icon) img_src
      , nvl2(is_parent, '586', link_name) target
      , nvl2(is_parent, 'P586_ID_PARENT', null) parent_item
      , nvl2(is_parent, link_name, null) parent_id
      , :app_id app_id
      , :app_session app_session
      , :debug debug
    from
        icon_tree
    where
        depth = 1
    

    In the interactive report, Use Custom Icon Link is set to Yes, and the custom link is:

    
      
      
    #ICON_NAME#

    Public static ID icons and results are applied to the IR and the regions second report respectively for use as selectors in action dynamics and CSS. The protected value property for the page P586_ID_PARENT element must be set to No for the value can be defined by a dynamic action.

    Dynamic action with several real actions is needed to bind alternatives click behavior to the links on the icons that have descendants (i.e. where the data-parent-id attribute has a value):

    Event: Click

    Selection type: jQuery Selector

    jQuery Selector:.apexir_WORKSHEET_ICONS a:not([data-parent-id=""])

    Real Actions

    Seq: 10

    Action: Delete the class

    Class:selected

    Selection type: jQuery Selector

    jQuery Selector:.apexir_WORKSHEET_ICONS a

    Seq: 20

    Action: Add the class

    Class:selected

    Selection type: trigger element

    Seq: 30

    Action: Set value

    Wait for result: Yes

    Type of value: Expression of JavaScript

    JavaScript expression:$(this.triggeringElement).attr('data-parent-id')

    Selection type: Agenda

    Point: P586_ID_PARENT

    Seq: 40

    Action: Discount

    Selection type: Region

    Region: results

    Seq:50

    Action: Show

    Selection type: Region

    Region: results

    Seq: 60

    Action: Cancel event

    Finally, add a style sheet to the Inline CSS property page. Initially, this hides the secondary report and select the parent clicked icon:

    #results {
      display: none;
    }
    #icons .apexir_WORKSHEET_ICONS a {
      border: 1px solid transparent;
      border-radius: 3px;
      padding: 0.8em 0 0.5em;
    }
      #icons .apexir_WORKSHEET_ICONS a.selected {
        border-color: #6a9cda;
        background-color: #bbd1ec;
        transition: 0.6s;
      }
    

    However, after all it is the question of why you use an interactive report here if you turned off all the features of the IR? A dynamic list with a custom template box seems to be more applicable?

  • Show/hide the elements if the rule is set to true on one of the many elements

    I'm sure I'm missing something really obvious but I've tried a few things and I can't get this to work...

    I need to show the element X if none of the elements A, B or C = 'Y '. Similarly, I want hide the element X if all a, B and C = 'n'.

    I tried to create a single action with A, B and C contained in the 'when' list of items and I tried also create separate stocks for A B and C, but both methods result in X being shown/hidden based on the last element that was changed, do not take into account the other fields.

    For example, if A and B are both equals Y, then I B = N, X is hidden. It must always be displayed as a still is equal to Y.

    What is the correct way to do it? Thank you.

    Hello

    create 1 dynamic action "to change" of P1_A, P1_B, P1_C

    Then set the status of the dynamic measurement JavaScript and enter the javascript, something like (assuming that the fields of the form are P1_A, P1_B, P1_C):

    $v ('P1_A') == 'Y ' |

    $v ('P1_B') == 'Y ' |

    $v ('P1_C') == 'Y '.

    And then set the true action to display the P1_X field

    Concerning

    Bottom

Maybe you are looking for

  • Cannot find sent email

    I downloaded the program. I am asked to give my e-mail address. I enter my email address, but do not get a confirmation email from back. However, now that I went to this Help Center, I was able to create an account, so I can now be able to complete t

  • Pavilion 500-339 usb 3 does not

    downgraded win8 to win7prof. USB 3 notworking despite downloading the drivers from the hp site

  • Cannot connect the satellite to LAN

    Basically, I can connect to my bb wireless but when I want to use the connection cable at the back it does not connect. It says "trying to connect through WAN miniport PP..." It's just. I have a map of network PA3362U 1MPC. I downloaded the updated I

  • Config PIX

    Salvation; I'm new on the PIX firewall and I'm looking to see if a project is possible. I have 1 PIX and 3 ISP of this need to be connected for redundancy and network protection. I need to know if my setup is possible and if so some info as to wher E

  • Writing of GREP

    I am trying to GREP address the text ${q: / / QID62/ChoiceTextEntryValue/1}. {I want to select all the items in $ to } and apply a character style (not orange). Does anyone know how to write the code GREP?