Value of the item application in javascript

I'm sorry that if this question has been asked, I can't find a clear answer on how to search through the forum.
I'm trying to access the value of an element of the application in javascript.
I tried $v('APPL_ITEM') and $v('APPL_ITEM').value, when I try with alert ($v('APPL_ITEM')) or ($v('APPL_ITEM').value) alert poster null or undefined.
I saw the session state, view all and see my request item hah a value.
How can I use the value of an element of application money in a JavaScript function.

Kind regards
Mark

Brand:

Application parts are not part of the HTML page generated by APEX and are therefore cannot be referenced using javascript. You can however write a JS function that uses AJAX to retrieve the value of the element of the request of session state. Something like

function getappitem(appitem){
  get = new htmldb_Get(null,$v('pFlowId'),'APPLICATION_PROCESS=GETAPPITEM',0);
  get.addParam('x01', appitem);
  gReturn = get.get();
  get = null;
 // alert (gReturn)
return gReturn;
} 

And and ODP named GETAPPITEM with the following code

HTP.PRN(v(APEX_APPLICATION.G_X01));

You can now call "getappitem" in JS like

getappitem ('TEMPORARY_ITEM') to get the value of the application element named "TEMPORARY_ITEM".

CITY

Tags: Database

Similar Questions

  • Set and get the value of the item application in Javascript

    Hello guys,.
    Can you tell me an example how to set and get the value of the application element in Javascript, and how do I check if the value of the point of application is null in Javascript, too. I have read a few replies, but nothing worked (e.g. $x (app_item), $v (app_item), $s (app_item) and so on).

    Thanks in advance!

    To get the value of an element, use the following syntax:

      alert("The value of MY_TEST_ITEM is " + $x("MY_TEST_ITEM").value);
    

    to set the value that you have just made

      $x("MY_TEST_ITEM").value="Set to this value";
    

    Keep in mind however that you need to send the page in order so that he could be picked up by APEX - javascript is CLIENT SIDE, ONLY! Either that or use AJAX to put on the side server.

  • How to pass the value of the item Application Javascript function.

    Hello

    I have the JavaScript in the properties attribute of the HTML Form element

    I'm on page 1 and passing the value of the item page P1_DEPT_NO. It is perferctly working very well and I am able to get the exact value of the element on the page
    onchange="javascript:function1($x('P1_DEPT_NO').value);"
    I'm on page 1 and passing the value G_DEPT_NO of the Application element .
    The problem here is, I don't get the point of Application inside the javascript function value.
    I tried to use alert(); and it gives me the undefined value
    onchange="javascript:function1($x('G_DEPT_NO').value);"
    I just want to know, How to pass the value of the Application in Javascript element.

    Thank you
    Deepak

    Deepak,

    I'm not a Javascript expert, but the suggestin I did was because the javascript is a case-sensitive... language and thats why onChange is not the same thing as onchange.
    Not sure if this is causing the problem.

    Application elements not associated with a page and have therefore no properties user interface.
    So, as mentioned in another post, the rendering would not work for the elements of the application.
    If it is for a single item, used only on this page, you might create a hidden page element and use it fo your goal

    If you want to keep watching objects application and AJAX, this page contains examples of using AJAX to solve problems like the one you mentioned.
    http://www.Oracle.com/technology/OBE/hol08/apexweb20/ajax_otn.htm#T1B

    Thank you
    Rajesh.

  • Generic procedure for the development of the item application of javascript?

    For now, all I can think about is a javascript function call to an application process, which looks like this:

    function setVariableValue (pName, pValue) {}
    var gReturn;
    get var = new htmldb_Get (null, $x('pFlowId').value, 'APPLICATION_PROCESS is odpSetVariableValue', 0);
    get.addParam('x01',pName);
    get.addParam('x02',pValue);
    gReturn = get.get ();
    get = null;
    }

    odpSetVariableValue
    Start
    immediate execution ':' || wwv_flow.g_x01 | ' := ' || wwv_flow.g_x02;
    end;

    Is there a function of APEX to do without "immediate execution"?

    Igor

    Hello Igor.

    I think you can do the same thing without actually executing a PL/SQL process (see here for an example).

    function setVariableValue (pName, pValue) {}
    get var = new htmldb_Get (null, $x('pFlowId').value, 'APPLICATION_PROCESS is dummy', 0);
    Get.Add (pName, pValue);
    var gReturn = get.get ();
    get = null;
    }

    (The dummy application process are really...)

    Greetings,
    Roel

    http://roelhartman.blogspot.com/
    http://www.bloggingaboutoracle.org/
    http://www.Logica.com/

    You can assign this answer to your question in marking it as useful or Correct ;-)

  • Get the value of the item application from another application

    Hello

    My apologies if this has been answered elsewhere, but it is very difficult to find something relevant when you are interested in the function V!

    My application consists of a number of different applications APEX that use the same cookie so that you can easily navigate between applications without having to log in again and to keep the same session id. Having separate applications allows to group pages and reuse the code easily.

    I have a requirement to be able to write the values stored in the fields in a single application to the database through a process on a page in another application. As a simplified example, that is to create messages and bookmarks of pages to display specific records in the database. The user will navigate through the system and find a record that they are interested, click on a button that displays a page from another application, enter in some details and then save the record in the database.

    The application of 'other' page knows the url of page called him, so that he knows also the application id and the page, but he doesn't know what file is being viewed. I can find the application and the page id is the name of the element that stores the primary key. I noticed that the V function also accepts the stream id, so it should be easy to then get the value by V (v_item_name, v_app_id). However it always returns null.

    I've simplified this by adding a page on the homepage (32561 application) process to insert a value in a table of test using a process page:
    insert into test values ('#'||V('P1_ID'));
    The result is #41
    So if I go to the page in the other application, I have a page process which is:
    insert into test values ('*'||V('P1_ID',32561));
    The result is *.
    I thought that maybe the other page of the application was ignorant of id flow, in that I spent, but change the above to:
    insert into test values ('*'||V('P1_ID',));
    The result is * 1 (the value of P1_ID in the other application)

    I'm doing something wrong? Have I misunderstood how the V function? Or is there another way I can retrieve the value of an element of application in another application?

    I am currently in 3.1.2, but I just tried this on apex.oracle.com (3.2) with the same results.

    Thank you very much
    Sara

    Hi Sara,.

    Have you seen the answer by Scott here -

    Re: Cross App State of Session

    Namely, using APEX_UTIL. FETCH_APP_ITEM

    APEX_UTIL.FETCH_APP_ITEM(
        p_item    IN VARCHAR2,
        p_app     IN NUMBER DEFAULT NULL,
        p_session IN NUMBER DEFAULT NULL)
    RETURN VARCHAR2;
    

    John.
    --------------------------------------------
    Blog: http://jes.blogs.shellprompt.net
    Work: http://www.apex-evangelists.com
    Author of Pro Application Express: http://tinyurl.com/3gu7cd
    AWARDS: Don't forget to mark correct or useful posts on the forum, not only for my answers, but for everyone!

  • Try to highlight the item application via javascript

    Hello

    I don't know what I do wrong here someone maybe can enlighten us? I have the following in my
    Header HTML of my login page
    <script language="JavaScript1.1" type="text/javascript">
    function setAppItem(val){
      var req = new htmldb_Get(null, &APP_ID., 'APPLICATION_PROCESS=dummy',  
      &APP_PAGE_ID.);
      req.add('F_LOGIN_MESSAGE', val);
      var gReturn = req.get();
      req = null;
    }
    </script>
    
    <script language="JavaScript1.1" type="text/javascript">
    function doLogin()
    {  
      var err = false;
    
      alert(document.getElementById('P101_USERNAME').value);
    
      if((document.getElementById('P101_USERNAME').value == '') ||
        (document.getElementById('P101_PASSWORD').value == '')) {
    
        setAppItem('You must enter a username and password.');
        err = true;
    
      }
    
      if(!err) {
        doSubmit('Login');
      }
    }
    </script>
    The setAppItem function is called, but it does not put the text of elements of application?

    Thanks in advance for any help!

    Hello

    Check your page now.
    I think you don't need any point or set those.
    Just the value internal node HTML DOM.

    BR, Jari

  • passing the value of the item to another page

    Hello!

    I have a few questions while passing the value of the item to another presentation page and page refreshes.

    I have a page (page n ° 2) with more areas where users can fill data in some articles (text box, popups,...), then I have a region report report and button to enter a new item. When users, click the button is it redirects to another page (page no. 21), where the user enters the values to other elements (popup, text box,...) then I have 3 buttons on this page ('Cancel', "create one", "create an and create another") and now I don't know how to handle the button ' create a. Action for the button "create one" I want is that when button "create one" is clicked in a table (in my DB) should be inserted some values of page 2 and certain values on page 21, then users should be redirected to page 2, where you can see everything that you see before the user has clicked 'enter a new element button' (so all the values in the elements of the page 2 must be visible) + in this report in the region must be updated (so you can see the inserted elements on page 21)

    I hope you understand what I mean and you can help me. And sorry again for my English.

    Kind regards
    Dragan

    You can create a collection and use it in this way:

    IF apex_collection.collection_exists ("YOUR_COLLECTION") = TRUE THEN
    apex_collection.delete_collection (p_collection_name-online 'YOUR_COLLECTION');
    END IF;
                             
    apex_collection.create_collection (p_collection_name-online 'YOUR_COLLECTION');

    -Value added to the collection
    apex_collection.add_member ("p_collection_name-online 'YOUR_COLLECTION', p_c001 => ' value to save");

    -get the value of collection
    Select C001 in apex_collections where collection_name = "YOUR_COLLECTION";

    Go through this link to learn more about the collections http://docs.oracle.com/cd/E17556_01/doc/apirefs.40/e15519/apex_collection.htm

    OR

    as you say if its only id you want to perform, then simply create an item hidden in your page 2 =>: P2_ID_SO, then capture the value in your 2 page deal and use it in page 21.

    -Manu

  • How to get the value of the global element using javascript or ajax!

    Hello!

    How can I read at global(point application created in the shared components) using ajax or javascript?
    You can imagine that I need to get the value of this element by function as:
    -----
    Function getText() {var itemVal = $x ('MY_GLOBAL_ITEM') .value;}  Return itemVal; }
    -----
    .. .but I can't do it because it is not made to couse of the page it is global element! so, anyone know no work around to do?
    I know that I can make point page and read the value of that, but not what I really need!
    If I have 100 pages and all pages need to use my function, it would take 100 Articles :) - that's why its no good average!

    Please, share your ideas!

    THX

    Rafix,

    You must use a little AJAX to retrieve a request element value. Three steps in this solution. Implementation of a callable JavaScript function, creating an application process on the request and call the JavaScript function with dynamic action.

    1 set up a JavaScript function that can be called by:

    This function calls the process of application level which has a visibility of the element of your application and then returns the value of points.

    Edit your page and JavaScript code according to the code in the 'function and Variable global statement' of your page. You can also add to the model page, that you use, but you also have to encapsulate this code in the script tags.

    getAppItem = function(pItemName){
        var get = new htmldb_Get(null,$v('pFlowId'),'APPLICATION_PROCESS=GET_APP_ITEM',$v('pStepId'));
        get.addParam('x01',pItemName);
        gReturn = get.get();
        get = null;
        return gReturn;
    }
    

    2. creating an application on request process:

    The application of level process has visibility to your application-level element. It is to retrieve the value of points and it prints the htp buffer. Essentially, this acts as a way to return the values of AJAX calls (the javascript function we set previously);

    go to the shared components > procedures > Create.

    Point process: "We Demand: run this application...". »
    Name: GET_APP_ITEM
    Type: Anonymous PL/SQL block

    declare
       -- get the item name passed into the JavaScript function.
       app_item_name varchar2(30) := apex_application.g_x01;
    begin
        -- print its value to the buffer
        htp.p(v(app_item_name));
    end;
    

    3. call the JavaScript function with dynamic action:

    The function call allows to specify an application-level element name and have its returned value. The trigger event is specific to what you need, but the action must be of type to run JavaScript code. In my case immediately the value of P1_NUMBER to my value of demand points. This code doesn't have to be in a dynamic action, but it helps to stay organized. you could call it from any script tag.

    $s('P1_NUMBER',getAppItem('MY_APP_ITEM'));
    

    See you soon,.
    Janet Tyson

  • Get the value of the item displayed in emails

    How can I get the display value one item and put in to the email to send?
    I know how to send emails, but I don't know how to get the value of the point in the emails.
    use the Application Express 4.1.1.00.23.

    Change the item P55_MANAGER_INFO and Save Session State value Yes if not already together and try again, it should work now

    because I suspect that you not save the displayed item session state.

  • read the value of the item page after filling value pop-up window

    I can't read or insert and also I cannot perform dynamic action of a page element data after the filling of the data page of the window popup (pass back to the point of the page). But I can read and insert, perform a dynamic action data while filling in the data using ajax and PLSQL code...


    How to read the value after the filling of database page popup window?


    SKUD

    Set value using Javascript is that in your browser page but is not yet available in the session. This is why the report does not return the expected results.

    Before you refresh the report, you need to set the session state from this point.

    You can configure after assigning a new value or before the report is updated to the element
    For interactive reports, is available built in
    You can go to report attributes > attributes advanced-> Page elements to submit and specify P2_X1 for the field (and any other page element that depends on the report)

    For standard reports, you can create a dynamic Action that is triggered 'before updating"report region, select PLSQL as action types, give a code BÉGIN END NULL; model and specify the name of the item in the item page to submit the field so that it affects the value of items in the session.

  • By the way the value of the report column in Javascript

    Dear magicians Apex,
    I am a bit stuck now to implement a modal pop-up/iframe/javascript and this forum is my last hope to solve this problem.
    Anyway, I will try to explain what I'm trying to accomplish.
    What I need, is: I want to have a SQL report, as first column I want to have an 'ID' of my table numbers and I want this column to have a "link in the column" located in the appropriate links "column attributes. The thing is that when I click on the link of the column (when I run my report on the Apex page) I need a JQuery modal window where the pop-up in IFrame will be another page and this page uses an 'ID' of my link URL column to display the data. So, basically, I want to pass a value of 'ID' of my page parent to my page of the child which appears in an iFrame modal window.
    And here's what I have:
    1. I have a SQL report:
     
    select SUBNET_ID, 
           long2ip(NETWORK_ADDRESS), 
           long2ip(SUBNET_MASK), 
           long2ip(END_HOST), 
           long2ip(START_HOST), 
           MAX_HOSTS, 
           long2ip(BROADCAST_IP), 
           NETWORK_CLASS, 
           NETWORK_SIZE, 
           HOST_SIZE 
    from   YC_CM_IP_SUBNETS 
    2 then, in 'The column attributes' to 'SUBNET_ID' a have put a "link in the column" URL like:
    javascript:ViewNetworkDetails(#SUBNET_ID#);
    3. now, when I run my page and point my mouse over any item in my column "SUBNET_ID", I see that she receives a number of "SUBNET_ID" of my table and it shows it in the button of the browser as:
    javascript:ViewNetworkDetails(1);
    , or (2) or anything that is 'SUBNET_ID '. So, that's good.
    4 and here I am confused, basically, I need to pass a value of
    javascript:ViewNetworkDetails(#SUBNET_ID#);
    , which seems to work as it gives me good numbers of my table to my 'ViewNetworkDetails' JavaScript function, then it can paste this value in "f?" p =... "IFrame URL. Here is my Jquery Modal script form and Javascript to redirect me to my popup page (the script is located in the HTML header):
     
    <script type="text/javascript"> 
    function ViewNetworkDetails(){ 
    var apexSession = $v('pInstance'); 
    var apexAppId = $v('pFlowId'); 
    var subnetIDNumber = document.getElementById(#SUBNET_ID#); 
    
    $(function(){ 
    vRuleBox = '<div id="ViewNetworkDetailsBox" title="View Subnet Details"> 
    <iframe src="f?p='+apexAppId+':103:'+apexSession+'::NO:103:P103_SUBNET_ID:'+subnetIDNumber+'
    "width="875" height="500" title="View Subnet Details" frameborder="no"></iframe></div>' 
    $(document.body).append(vRuleBox); 
    $("#ViewNetworkDetailsBox").dialog({ 
                            buttons:{"Cancel":function(){$(this).dialog("close");}}, 
                            stack: true, 
    modal: true,                             
                            width: 950,                     
    resizable: true, 
    autoResize: true, 
    draggable: true, 
    close : function(){$("#ViewNetworkDetailsBox").remove(); 
                            location.reload(true); } 
    }); 
    }); 
    } 
    </script> 
    PS My hypothesis is that there is a problem with this part of my script
    var subnetIDNumber = document.getElementById(#SUBNET_ID#); 
    where I can't get my "SUBNET_ID" value from
    javascript:ViewNetworkDetails(#SUBNET_ID#);
    in 'subnetIDNumber' variable and that's why I can't spend my iFrame URL.

    P.S. P.S. the child page 103 has a "Automated row fetch", is not a problem. In addition, I did a simple test, where I had a page element 'P102_Value' with values and in my script I had instead
    var subnetIDNumber = document.getElementById(#SUBNET_ID#); 
    This
    var subnetIDNumber = $v('P102_Value'); 
    and it worked perfectly fine... but cannot operate against the SQL Select statement :-(

    HEEEEEEEEEEEEEELLLLLPPPP.
    Thank you

    Change your column to link to send the value of the subnet_id column to the function call (you mentioned, but I don't know if you've actually done m)

    JavaScript:ViewNetworkDetails(#SUBNET_ID#);

    You pass the value of the parameter to the function, but not defined all the parameters in the function definition (this is possible in JS, no other parameter is ignored)
    For example, to change the function to accept the subnet ID parameter (I'm really surprised how you missed it) and assign this parameter to a variable.