JavaScript input parameter should take the value of the element page Apex

I have a JavaScript function which i dwonloaded ffrom net to generate bar codes

DrawCode39Barcode(data,checkDigit).

I call this function in the body of page attribute by using the following script

< div id = "P5_X" > < / div >

< script type = "text/javascript" >

/ * < ! [CDATA [* /]]

function get_object (id) {}

var object = null;

If (document.layers) {}

object = document.layers [id];

} Else if (document.all) {}

object = document.all [id];

} else if (document.getElementById) {}

object = document.getElementById (id);

}

Returns the object;

}

get_object('P5_X').innerHTML = DrawCode39Barcode('1-1-1111',0);

< /script >

When I run the page, the barcode for the value 1-1-1111' is generated. Please help so that when this page is running it will automatically take the value of the page item P5_X as parameter instead of hard coded value ' 1 - 1-1111'

I think it would be simpler. You use the same id for the region and the order of the day, they must be different id

JavaScript code can be in a dynamic action who sets fire to the loading of the page, or load Execute on the page of your page properties section.

$('#barcode').html (DrawCode39Barcode ($v ('P5_X'), 0));

Tags: Database

Similar Questions

  • passing values from one page to bring up the window page apex

    Hi all

    I created the java script to open a new window to send mail from apex.

    < script language = "JavaScript" type = "text/javascript" >

    function send_mails (template_id) {}
    Window.Open ('https://hrssc-in.oraclecorp.com/pls/apex/f?p=154:15: & SESSION.: 15:P15_VENDOR_CODE, P15_MONTH, P15_YEAR, P15_DISCREPANCY_DETAILS_DL, P15_DISCREPANCY_DETAILS_CS, P15_DISCREPANCY_DETAILS_PF, P15_DISCREPANCY_DETAILS_ESI, P15_TEMPLATE_ID: & P2_VENDOR_NAME., P2_MONTH., P2_YEAR., & P2_DISCREPANCY_DETAILS_DL, & P2_DISCREPANCY_DETAILS_CS. & P2_DISCREPANCY_DETAILS_PF. & P2_DISCREPANCY_DETAILS_ESI.) (,'+ category, null, "height = 500, width = 1200, status = yes, toolbar = no, menubar = no, location = no, scrollbars = yes") ;}


    < /script >

    I can change the value of page 2 to the page 15 using the code above that if I choose page submitt for items (action when the changed value of the page).

    If there is another way to transmit values without submitting the items (in the action of the page tab).

    can someone help me solve this problem

    Thanks in advance,

    Year s

    Hello

    the function of $ v that allows you to get the values of the elements cannot be used as part of the parameter to window.open.
    Try to concatenate function calls v$ in the parameter

    
    

    What does the category in the parameter string?

    Kind regards
    Erik-jan

  • Referring to the value of the element Page 0 in another page

    Apex: 4.2

    All,

    On my page 0, I gave 2 parts in stock. P0_QUESTIONS as a screen only and P0_OPTIONS like a Radio button.

    The source of these items are picked on the backend tables based on the: APP_PAGE_ID.

    All on Page 1: I chose an option in the account of radio

    If I want to see the value above in Page 3, how to do?

    As the elements are on Page 0, there is no point on P1 to designate...

    How can I go?

    TIA,

    J

    J wrote:

    I have ' developing a simple application of review.

    I have two tables,

    (1) QUESTIONS

    (2) OPTIONS

    Each page will have two elements. Question (screen only) and Options (Group of Radio buttons).

    For now, I have two P0_QUESTION and P0_OPTIONS points to the page0.

    The values for the above elements will be extracted from the database based on the APP_PAGE_ID.

    But to store the value of P0_OPTION on each page, I have to create a local element in each page.

    Since there will be a lot of questions, there will be a lot of pages and I wouldn't manually create local objects on each page, instead it is possible to create a component hidden dynamically based on the page no? Or something like a table to store the value?

    It is not practical to create an application with a separate page for each question. This type of application can be dynamically driven data using a question page. Rather than use the 0 page, create a unique question page containing the elements of the question and option (personally I would use relationships rather than objects, but that adds more complexity) and another to store the current number of the question. Before you navigate to the page in question for the first time, create three collections of the APEX. Two collections on queries for issues and the basic options and a third empty one to store the user's responses. On the page in question, back issues and options of the collections instead of the base tables. This ensures that users get consistent questions and options sets, even though they are simultaneously changed by other users. Terms of use on the current number of the question to control the display of the next/previous/Finish buttons or links; conditional calculations on next/previous controls to increment/decrement the current number of the question; a process to register the user in the collection's response; a conditional branch, triggered by control of finishing for a final presentation page; and an unconditional branch to the page in question to scroll through all the questions.

    (This is a good example of a Problem of XY. Rather than ask the question "I develop an application examination.» How can I implement this in APEX? "before you start, you selected an inappropriate solution and asked about the problems that have arisen in its application. You should always include some background to the question and if in doubt about the best approach, describe the requirements, not a proposed solution)

  • APEX 5 how trigger javascript closing dialogue processes in the modal page

    I have a process of dialogue (after Submit) on the page of the modal dialog box. I want to start the process of dialogue of javascript which is placed in the header HTML of the page of the modal dialog box. The javascript function is called by a button on the page.

    I can't call the process of dialog close directly from the button that I need to do a treatment before calling the close dialog box.

    All entries will be appreciated.

    Thank you

    Hina

    Hi Hina,

    Sorry no test with your approach to the link before. The problem is that 'this' in your link doesn't point to the anchor like someone link DOM element assumes that, instead the browser gives 'window '.

    So, in my opinion, you have three options to get this working.

    1. If you don't have a single link of the modal dialog box on your page, you can change your dynamic action to listen window instead of #assignee_link. Change 'sélection Type' to "Expression JavaScript" and enter in the window as a JavaScript Expression. Please note that for other developers, it will be very opaque.
    2. Or instead use a link, use a button and set the 'Position of the button' attribute to 'The region body' and 'Start new line' = no. to display the button next to your article. That would be my preferred solution because it is also the most accessible version.
    3. Or that of your model instead of using markup and button button duplicate, use your link + html markup to display the button as a link with a picture of the image.

    Concerning

    Patrick

  • How to keep the State page apex value after connection page

    Does anyone know to keep the State in a page of the apex, when I go to another page and come back? He keeps all the values entered into the fields, it seems that the gaps?

    I have 5 regions and each region have elements: text fields, selectors of dates, popup lov, field numbers, text box and view point only. When I go to the next page with redirect and return I see popup lovs values and values of one or two display items only. The values of the other text fields, dates selectors and the display just empty.

    Thank you everyone can help. Thank you.

    Kind regards
    Dragan

    Hello

    This element only display recording session state?
    Checks the attributes of the element.

    Kind regards
    Jari

    -----
    My Blog: http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0
    Twitter: http://www.twitter.com/jariolai

  • anchor link takes the biased page

    I created my page to be at the centre of the browser, and when I go to preview and click the link that is bound to a "link anchor", the entire page moves to the left of the browser set anchor in the upper corner of the browser. How can I keep the page focused by clicking on the link?

    Thanks for the answer to my question, that it itself has helped me solve the problem.

    So I did as you said and tried it on a new website and it worked fine, I tried to think of what I did then different in my original site and came to that it is the image that I have placed on the line of browser that messed up the anchor, that I took it and place this image in the background of the browser and it works very well!

    Thanks a ton!

  • conditionally display name of the field page apex LABEL in the email of the Apex.

    Hello
    I'm using Apex email process.

    I have a page where I have check conditions. ONLY WHEN the checkbox is enabled in the 'yes', I need to display this field in emails.
    Please notify

    field 1-birthday card order YES NO
    field 2-marriage card order YES NO



    If 1 is checked YES and 2 - is checked that NO, I need to insert only

    The NAME of the field LABEL 1. like...

    * 1 - birthday card order *. How? Please notify.

    Thank you
    KP

    Published by: user8612301 on March 7, 2013 13:47

    You can query the integrated views apex

    select LABEL from apex_application_page_items
    where application_id =110
    and page_id = 18
    //OR
    where ITEM_NAME = 'PX_ITEM_NAME'
    
  • My firefox home page takes the entire page of my screen. I want to retrieve my bar menu and toolbar. How can I do this?

    I did somehow full screen in one click

    Hello

    Command + SHIFT + F (on mac), F11 on the victory.

    Thank you

  • Call the generic page APEX request

    I'm running 5 APEX. My APEX page, I try to call a stored procedure of DB which makes a call to another page (see sources below). When I try to run the procedure, I get

    ORA-29273: HTTP request failed ORA-24247: access denied by access control (ACL) of network list


    I tried to run the grant_acl script in the BD, but still not the same error. What Miss me?


    DECLARE

    ACL_PATH VARCHAR2 (4000);

    BEGIN

    -Did the ACL currently assigned to ' *' and give APEX_050000

    -the 'connect' privilege if APEX_050000

    -has not yet the privilege.

    SELECT ACLS IN ACL_PATH OF DBA_NETWORK_ACLS

    WHERE HOST = ' *' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;

    IF DBMS_NETWORK_ACL_ADMIN. CHECK_PRIVILEGE (ACL_PATH, 'APEX_050000',

    'connect') IS ZERO THEN

    DBMS_NETWORK_ACL_ADMIN. ADD_PRIVILEGE (ACL_PATH,

    "APEX_050000", TRUE, "connect");

    END IF;

    EXCEPTION

    -When no ACL has been attributed to ' *'.

    WHEN NO_DATA_FOUND THEN

    DBMS_NETWORK_ACL_ADMIN. CREATE_ACL ('power_users.xml',

    "ACL that allows users to be able to connect everywhere."

    "APEX_050000", TRUE, "connect");

    DBMS_NETWORK_ACL_ADMIN. ASSIGN_ACL('power_users.) XML ',' *');

    END;

    /

    COMMIT;

    create or replace procedure 'SET_CURRENT_SELECTION' IS

    l_clob CLOB.

    Req UTL_HTTP. REQ;

    resp UTL_HTTP. RESP;

    VARCHAR2 value (1024);

    BEGIN

    req: = UTL_HTTP. BEGIN_REQUEST ('http://sonar.powerschool.com/api/timemachine?resource=com.pearson.powerschool:milan - components-tools - customfields:tallac & metric = test & format = csv' ');

    Utl_http.set_header (req, "User-Agent", "Mozilla/4.0" "");

    resp: = UTL_HTTP. GET_RESPONSE (req);

    LOOP

    UTL_HTTP. READ_LINE (RESP, value, TRUE);

    DBMS_OUTPUT. Put_line (value);

    END LOOP;

    UTL_HTTP. END_RESPONSE (resp);

    EXCEPTION

    WHEN UTL_HTTP.end_of_body THEN

    Utl_http.end_response (resp);

    END;

    Hi bobmagan,

    bobmagan wrote:

    I'm running 5 APEX. My APEX page, I try to call a stored procedure of DB which makes a call to another page (see sources below).

    create or replace procedure 'SET_CURRENT_SELECTION' IS

    l_clob CLOB.

    Req UTL_HTTP. REQ;

    resp UTL_HTTP. RESP;

    VARCHAR2 value (1024);

    BEGIN

    Req: = UTL_HTTP. BEGIN_REQUEST ("http://sonar.powerschool.com/api/timemachine?resource=com.pearson.powerschool:milan - components-tools - customfields:tallac & metric = test & format = csv' ');

    Utl_http.set_header (req, "User-Agent", "Mozilla/4.0" "");

    resp: = UTL_HTTP. GET_RESPONSE (req);

    LOOP

    UTL_HTTP. READ_LINE (RESP, value, TRUE);

    DBMS_OUTPUT. Put_line (value);

    END LOOP;

    UTL_HTTP. END_RESPONSE (resp);

    EXCEPTION

    WHEN UTL_HTTP.end_of_body THEN

    Utl_http.end_response (resp);

    END;

    Instead of UTL_HTTP, why not use APEX_WEB_SERVICE?

    As the Web Service, you call a RESTful Web Service, you can use APEX_WEB_SERVICE. MAKE_REST_REQUEST function as follows:

    create or replace procedure set_current_selection
    is
      l_clob clob;
      l_buffer         varchar2(32767);
      l_amount         number;
      l_offset         number;
      l_url            varchar(4000) := 'http://sonar.powerschool.com/api/timemachine?resource=com.pearson.powerschool:milan-components-tools-customfields:tallac&metrics=tests&format=csv';
    begin
    
      l_clob := apex_web_service.make_rest_request (
                  p_url => l_url,
                  p_http_method => 'GET' );
    
        l_amount := 32000;
        l_offset := 1;
        begin
            loop
                dbms_lob.read( l_clob, l_amount, l_offset, l_buffer );
                dbms_output.put_line(l_buffer);
                l_offset := l_offset + l_amount;
                l_amount := 32000;
            end loop;
        exception
            when no_data_found then
                null;
        end;
    
    end;
    

    Kind regards

    Kiran

  • Cannot display the home page /apex or /apex_admin after the installation of the local computer

    Hello

    I am trying to install and run a local version of Apex 4.2.2 on my Windows 7 laptop.  I followed the instructions in the Setup Guide of Apex.  And followed the troubleshooting steps and previous patterns uninstalled previous facilities.  Set up and ran the @apexins SYSAUX SYSAUX TEMP/i /.  And configured for the embedded PL/SQL Gateway Protocol. When you enter the url of the apex apex / http://127.0.0.0:8080 / apex_admin browser (configured to run java script) runs for 30 seconds then go back to the page "connection has expired.  The server to 127.0.0.0 takes too long to respond. "Is there something else I need to check/try (log files?).  At one point I had installed 3.2.2 Apex and to the top and runnign on the same laptop, but were not able to get the apex operational 4.x.  Thanks for any help.  -Mike

    Thank you, that did the trick!

  • problem with writing a procedure with the name of the table as an input parameter

    Hi all

    I am writing a procedure with the table name as input parameter:
    Here is the code

    create or replace procedure CEP (in_tbl in varchar2)
    as
    Start

    run immediately 'truncate table tlb;

    Insert into tbl

    Select a, b, c of in_tbl;

    end;

    user579585 wrote:
    Hi all

    I am writing a procedure with the table name as input parameter:
    Here is the code

    create or replace procedure CEP (in_tbl in varchar2)
    as
    Start

    run immediately 'truncate table tlb;

    Insert into tbl

    Select a, b, c of in_tbl;

    end;

    You will also need to use dynamic sql for insert statements:

    execute immediate 'begin insert into tbl select a,b,c from '||in_tbl||'; end';
    
  • manage an invalid input parameter

    Hello

    How to build a message indicating what input parameter has an invalid value. ?
    CREATE OR REPLACE PROCEDURE loaddata ( pGroupID         IN  VARCHAR2,
                                              pOrderNumber  IN  VARCHAR2,
                                              pOrderDate       IN  DATE,
                                              pItemName       IN  VARCHAR2,
                                              pErrorcode         OUT  NUMBER,
                                              pErrormssg        OUT VARCHAR2 )
    Thank you
    Sandy

    Thanks for the reply... It is part of the package and supposed to highlight package, after a few modifications.

    OK, but this does not add to your description.

    How to view the message

    In general, you do not display messages. Throw you exceptions in pl/sql.

    5 input parameter which parameter was incorrect or incompatible data type?

    Your procedure has 4 in. and 2 out parameters.

    You can not call a procedure with incorrect arguments.

    Inside of your procedure, you have to assume that his name was properly or an exception would have been thrown in the environment called him.

    If the arguments must be validation, you must do the proper tests and throw exceptions as needed.

  • The "Current Page" value as default for printing

    Hello, we are using Adobe Reader XI (ver. 11.0.10), I have a need to change the print parameter default for the current page.)  Someone had to do this?

    Is not possible.

  • to clear all values prompts in a page

    Hello

    With the help of obiee 11g
    have a req as if I had a dashboard with many pages. Each page has several guests.
    In page 1, I have 3 guests, what I want is to have a button which, when clicked should clear all values
    guests of this page.
    Is it possible to have as a button?
    I know reset works, but I want to after clicking the button apply.

    Thank you

    In your dashboard, create a text section and add the following code
    {div class = "XUIPromptEntry minibuttonOn"} {a href = "#" onclick = "return PersonalizationEditor.removeDefaultSelection (false)"} Clear the selection {a} {div}

    Check contains the HTML markup

    Replace {} with "<' '="">" in the code above

  • Spry menu bar not working do not on the other pages

    Hello

    I've been struggling with this all day - I want to copy my menu bar horizontal spry in several pages of my site.  I am doing this creating a model .dwt with the original menu bar, to research and to behave as it should.  The new page displays the bar correctly but does not - no function drop-down list.  I don't know if this has nothing to do with the menu bar being a library item (and not on the css and js?)  Can anyone help?

    Instead of using a template, take a look at this article http://foundationphp.com/tutorials/sprymenu/ssi.php

    GRAMPS

Maybe you are looking for