Run PLSQL code by click on button usin javascript

Hi
I want to run plsql code
on click button using javascript
javascript is ok but code of plsql is not run
suggest me
APEX 4.2.1
Oracle !!XE
Windows Server
Firefox 17.0.1
Theme Cloudy
thanks in advance
bUTTON CODE IN PLSQL CODE AND SEND_RMNDE IS PROCEDURE
'<button type="button" name="button1" onclick="send_rmndr('
||NO_DUES_MASTER.CERT_ID
||');" value ='
||NO_DUES_MASTER.CERT_ID
||'> '
||'Remind'
||'</button>'
JAVASCRIPT
<script type="text/javascript">
function send_rmndr(pThis)
var params='x= '+pThis;
var get=new htmldb_Get(null,null,null,&APP_PAGE_ID.,null,'send_reminder',params);
gReturn = get.get();
//alert(gReturn);
alert ('inside script ' +params);
//get=null;
</script>
Edited by: 969091 on Feb 1, 2013 9:13 PM

send_reminder needs to be defined as an application process
Alternatively, you can define a dynamic action and do this more declaratively.
It's easy to define a DA that fires on click of a button that runs PL/SQL, and you can also define which page items are sent to and received from the plsql via session state.
Scott
blog: [url grassroots-oracle.com]grassroots-oracle.com
twitter: [url twitter.com/swesley_perth]@swesley_perth
-- please mark any useful posts as helpful or correct, in the end it helps us all

Similar Messages

  • How to run a batch file clicking a button?

    Hi All,
    Can you tell me anyone how to run a batch file clicking a button? And also the progress bar showing the progress.
    Arif

    As said: write the insert statement like above (of course replace the databaselink, column and table names with your own) in a stored procedure and call this procedure in the WHEN-BUTTON-PRESSED Trigger.
    As for the progress bar: how many records are you processing and how is the network connection between your database server? As above method is rather fast it might take just a few seconds and you could spare you the progress bar (this might be a little tricky to implement).
    cheers

  • Trying to makea report run when clicking a button on a form

    I am trying to run a report by clicking a button on a form (Forms 9i)
    I have modified the registry settings for FORMS90_PATH and REPORTS_PATH to include my development directory, and now at last the report is generating. However the command to display the form in a window is not doing anything at all - no error even. Can someone please help, the trigger code for my button is displayed below:
    DECLARE
         rep_result VARCHAR2(30);
    BEGIN
         SET_REPORT_OBJECT_PROPERTY('INVENTORY_REPORT', REPORT_FILENAME, :GLOBAL.project_path || 'Inventory.rdf');
         SET_REPORT_OBJECT_PROPERTY('INVENTORY_REPORT', REPORT_DESNAME, :GLOBAL.project_path || 'Inventory.htm');
         rep_result := RUN_REPORT_OBJECT('INVENTORY_REPORT');
         --MESSAGE('Rep result: ' || rep_result);
         WEB.SHOW_DOCUMENT('file:///' || :GLOBAL.project_path || 'Inventory.htm', '_blank');
         --WEB.SHOW_DOCUMENT('file:///C:\Temp\Dev\Inventory.htm', '_blank');
    END;
    thx
    adam

    Hi,
    may be this could be helpful for you:
    You have to include the following code to execute a report:
    repid REPORT_OBJECT;
    v_rep VARCHAR2(100);
    rep_status Varchar2(20);
    BEGIN
    repid := find_report_object(report_name);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=no');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_EXECUTION_MODE,BATCH);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_COMM_MODE,SYNCHRONOUS);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESTYPE,CACHE);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'pdf');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,report_server_name);
    v_rep := RUN_REPORT_OBJECT(repid);
    rep_status := report_object_status(v_rep);
    WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED') LOOP
    rep_status := report_object_status(v_rep);
    END LOOP;
    if rep_status = 'FINISHED' then
    WEB.SHOW_DOCUMENT('/reports/rwservlet/getjobid'||substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server=repserver90','_blank');
    else
    error report not exists
    end if;
    END;
    Also you have to create the report server with the command:
    "rwserver - install service_name autostart=yes
    report server name must be the same that appears in the code above
    You must add the report to run in the REPORT object type in your .fmb and put there with the same name
    The report server to install ought to be the one and only in you network to avoid mistakes...

  • Run code without usual labview buttons

    I am creating an application. I disabled the run and abort buttons
    on the front panel. I want to run the code by using simple buttons
    of the frontpanel other than the run button. If anyone can give me
    a simple example like generating random number inside a while loop
    but without using the run button on top of frontpanel it could be great.

    You already got great advice, here are some general comments.
    Yesh wrote:
    What you are saying is that I should run it automaticaly when the VI opens
    and just use an event structure inside labview to wait for start button. This
    does look like a soultion, but wouldnt it take lot of memory if its big application.
    Is there anyway I can trigger the Run or the command you just mentioned.
    I think you have a misconception here. Once a VI is loaded into memory, there is little
    difference in memory use between running or not running. If an event structure is just
    waiting, CPU use is ~zero.
    Yesh wrote:
    The other problem is I need to create an infinite loop in such cases, because if I stop
    the while loop it wouldnot execute again when i press start.
    Once the VI is set to run when opened, the only reason to stop it is to make edit changes.
    (Once it is built into an application, it shoud close when done).
    Don't make an infinite loop, but make sure to detect when the user is done with the program.
    If there is hardware involved, certain shutdown steps are often needed (disconnect from instrument,
    set voltages to zero, etc.), so you could trigger those with a "panel close?" event, for example.
    LabVIEW Champion . Do more with less code and in less time .

  • Run code when a radio button is clicked

    I have a radio group with various radio buttons in there
    named date, time,
    reg etc
    When I click on a button I need the following:
    Which radio button was pressed
    The value of that button eg date, time, reg etc
    Then run some code (I will use the value to run a MYSQL
    query)
    The idea is to be able to sort a table based on the header
    that was clicked.
    Cheers
    SteveW

    Thanks for the help so far.
    I am using dreamweaver 8. ASP VBScript
    I would rather not use javascript as our operators have PDA's
    and we are
    trying to use the same interface for everyone.
    What I am trying to do is re-sort a Table by either reg,
    date, user order
    etc. by clicking on the radio buttons.
    The table is populated with MYSQL have a look at
    http://80.5.54.164/swiff/contact.asp
    user 1 password 1
    Unless there is another way to achieve this
    Cheers
    SteveW
    "bregent" <[email protected]> wrote in
    message
    news:elithk$a5n$[email protected]..
    > >Then run some code (I will use the value to run a
    MYSQL query)
    >
    > >The idea is to be able to sort a table based on the
    header that was
    > >clicked.
    >
    > Are you trying to sort the table by resubmitting a new
    sql query, or sort
    > the
    > table client side? I would suggest the latter.
    >

  • Plsql code for button.....

    i have a page which contain fields term_id,*term_desc*,*term_condition*
    and some buttons Add,*delete* and save..
    Actually no data in the table..
    when i press Add button the term_id should get increment by '1' .
    where i have to wite the below coding in Edit Add button?
    can i put the coding in Conditional Item Display condition type PLSQL?
    declare
    a number;
    begin
    select max(nvl(term_id,0))+1 into a from term_creation;
    *:P5_TERM_ID*:=a;
    end;
    Edited by: skud on Mar 5, 2011 2:05 AM

    You can submit the page with a request say "MY_REQUEST" and run a conditional PLSQL block(request equal to MY_REQUEST) and add the PLSQL code there.
    If you want to do it without submitting page
    <li>Apex Version 4 : Add an id to button (button attributes, id ="MY_BUTTON" ) and add a Dynamic Action fired on click of DOM element : MY_BUTTON , event type would be PLSQL and write your PLSQL code there(add required page items to be submitted in the field)
    <li>Apex 3.x and 2.x(works iwth apex 4 too), create an ondemand PLSQL process, call the process from a javascript function(add the item values to session using the ajax request handle) and call the javascript function from the button click( action type: redircet to URL , javascript:function_name(parameter1,parameter2) )

  • ActiveX Objects Don't Run Code When Clicked after installing SP3 for 2007

    I have an application that I built using Excel 2013 for a client who uses Excel 2007. Up until mid-December of last year, the application ran fine on the client's machines.    Today we found that their version does not work - specifically,
    clicking an ActiveX command button does not result in code running.  Of course, we double-checked to make sure macros were enabled etc.  We tested other files and got the same result. We tried running them off of thumb drives, to no avail. We
    then learned from their IT guy that a MS security patch, 2984942, was installed on 12/12.  Has anyone experienced any issues running VBA code in either 2007 or 2013 after installing that patch? What am I missing?
    Thanks in Advance.
    Bugless

    I have an application that I built using Excel 2013 for a client who uses Excel 2007. Up until mid-December of last year, the application ran fine on the client's machines.    Today we found that their version does not work - specifically,
    clicking an ActiveX command button does not result in code running.  Of course, we double-checked to make sure macros were enabled etc.  We tested other files and got the same result. We tried running them off of thumb drives, to no avail. We
    then learned from their IT guy that a MS security patch, 2984942, was installed on 12/12.  Has anyone experienced any issues running VBA code in either 2007 or 2013 after installing that patch? What am I missing?
    Thanks in Advance.
    Bugless
    Yes, recent update in December broke ActiveX objects in Office. Solution is simple. Close all instances of Excel and other Office products. Do a wild card search for "exd" files (not exe !).  Delete all the exd files.

  • Run a function in flash when click a button on HTML page

    dear friends,
    i have loaded my swf in an html/ aspx page. when i click a button in html page, i want to pause my swf movie. Actually swf has another movie clip i want to stop that. any option pls help me. possible send me some sample coadings.. i tried with externalInterface but no result..
    or if i click a button in html page, i want to run a function existing in loaded swf....
    thanks in advance...
    Thanks and Regards,
    Syed Abdul Rahim

    Dear Mr.ned,
    Greetings! i tried to put the id also, still its not working.. any ideas? find below my codings:
    flash code:
    import flash.external.ExternalInterface;
    ExternalInterface.addCallback("methodName", method );
    function method() {
        mytxt.text = "call from java script";
        trace("called from javascript");
    HTML code:
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>jscr_rd</title>
    <script language="javascript">AC_FL_RunContent = 0;</script>
    <script src="AC_RunActiveContent.js" language="javascript"></script>
    </head>
    <body bgcolor="#ffffff">
    <p>
      <!--url's used in the movie-->
      <!--text used in the movie-->
      <!--
    <p align="left"></p>
    -->
      <!-- saved from url=(0013)about:internet -->
      </script>
      <script language="javascript" type="text" >
    function methodName() {
       jscr_rd.method();
       window.alert("hi.. u clicked me?");
    </script>
      <script language="javascript">
        if (AC_FL_RunContent == 0) {
            alert("This page requires AC_RunActiveContent.js.");
        } else {
            AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0','widt h','550','height','400','id','jscr_rd','align','middle','src','jscr_rd','quality','high',' bgcolor','#ffffff','name','jscr_rd','allowscriptaccess','sameDomain','allowfullscreen','fa lse','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','jscr_rd' ); //end AC code
    </script>
      <noscript>
        <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="550" height="400" id="jscr_rd" align="middle">
          <param name="allowScriptAccess" value="sameDomain" />
          <param name="allowFullScreen" value="false" />
          <param name="movie" value="jscr_rd.swf" />
          <param name="quality" value="high" />
          <param name="bgcolor" value="#ffffff" />   
          <embed src="jscr_rd.swf" quality="high" bgcolor="#ffffff" width="550" height="400" name="jscr_rd" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />   
      </object>
      </noscript>
    </p>
    <form name="form1" method="post" action="">
    <input name="but" type="button" value="click me" onClick="methodName()">
    </form>
    <p> </p>
    </body>
    </html>
    pls check advice me
    Thanks and Regards,
    Syed Abdul Rahim

  • How can I do to code the equivalent of: Wait ... until(click one button)?

    Thanks to answer me and to send me a little code which explains the solution.
    A French guy.

    If you have to display a panel and wait for the user to click one button to proceed, you could use GetUserEvent ().
    I use it when I have to disply a popup panel
    different from MessagePopup or PrompPopup or similar and I don't want to deal with a separate callback to manage controls on that panel. Here you find an example: I display a popup for the user to input a password (using the password control in toolbox to display an input string with the usual '*****' pattern while typing).
    pwH = LoadPanel (0, UIR, pwd);
    InstallPopup (pwH);
    PasswordCtrl_ConvertFromString (pwH, pwd_pw);
    errChk (PasswordCtrl_SetAttribute (pwH, pwd_pw, ATTR_PASSWORD_MAX_LENGTH, 12);
    while (TRUE) {
    GetUserEvent (1, &pnl, &ctrl); // Program waits until a button pressed
    // Here when a button
    have been pressed
    if (ctrl == pwd_quit) { // 'Abort'
    button
    // Exit from function, close popup...
    PasswordCtrl_GetAttribute (pnl, pwd_pw, ATTR_PASSWORD_VAL, pw); // Read password
    if (strcmp (pw, correct_password))
    MessagePopup ("PASSWORD",
    "Incorrect password. Retry.");
    else
    break; // Correct password
    RemovePopup (0);
    I use it where I don't want to exit from the actual function to manage the 'Ok' button from the popup panel elsewhere.
    Hope this helps
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • I am unable to redeem my purchase of a Photoshop Elements 12 software license.  After entering the redemption code and clicking on the Redeem button, nothing happens.  No error message.  Screen does not change.

    I am unable to redeem my purchase of a Photoshop Elements 12 software license.  After entering the redemption code and clicking on the Redeem button, nothing happens.  No error message.  Screen does not change.

    try using a different browser, or contact support Contact Customer Care

  • Am facing this error sqlcode :-6502 while running sql code in plsql block

    Am facing this error sqlcode :-6502 while running sql code in plsql block.
    am using query :
    SELECT SUBSTR('123456DE789KL|987654321|B',1,INSTR('123456DE789KL|987654321|B','|')-1) FROM DUAL;
    CAN any body tell me why.

    BD_Fayez wrote:
    I've tried the following, but don't get any error.As I mentioned, most likely variable is too short:
    SQL> declare
      2  strSub varchar2(2);
      3  begin
      4  SELECT SUBSTR('123456DE789KL|987654321|B',1,INSTR('123456DE789KL|987654321|B','|')-1) into strSub FROM DUAL;
      5  dbms_output.put_line(strSub);
      6  end;
      7  /
    declare
    ERROR at line 1:
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    ORA-06512: at line 4
    SQL> SY.

  • Letting user to click a button and run an application

    Hi all,
    I'm trying to do this: once the user logged on, the user can click a button to run an application. If it's the first time he/she use it, it'll let user to download the program and then run it. How can I do that?
    Thank you.
    Cal

    Find out about Java Web Start.

  • How to run a subVI without poping up normally, but when clicking a button, popup the front panel?

    I know pop-up the front panel of a subVi when called by selecting VI Properties>>Windows apperence.
    But what I need to do is: always run the SubVI inside the parent VI as the nornal subVI do without poping up. But when I click a button"show front panel", the SubVI popup the front panel.
    Is there anyway to do this?
    Thanks,

    ossoo,
             You can use a static VI reference to the subVI and then use the Front Panel Open invoke method to show the front panel when you want. I have attached two VIs that show this. I saved these VIs for LabVIEW 2009 so you should be able to open them up and run them in 2009 or later. Add.VI is the subVI that you are calling. The Caller.VI is just a While Loop that contiually calls the Add subVI. Inside of the While Loop is also a Case Structure with a Static VI Reference (you might need to change the path this is pointing to after downloading the VIs to your computer for this to work) and the Front Panel Open invoke method. You can run the Caller.VI and interact with the main Front Panel as normal and see the subVI but then you can click the Open subVI? boolean button and it will open the subVI's front panel. You can continue to interact with the main front panel and see the values update on the subVI's front panel as well. You can just close the subVI's front panel when you are done viewing it. Does this help?
    Grant H.
    National Instruments
    LabVIEW Product Marketing Manager
    Attachments:
    Caller.vi ‏19 KB
    Add.vi ‏23 KB

  • Run time error when clicking on sum button

    Hi,
        I have used a field (data type-QUAN,length-10,Decimal Places-3)
    in an internal table. I have passed this table in 'REUSE_ALV_GRID_DISPLAY'.
        When I wan to see the 'sum' by clicking the button on the application tool bar , There is always a run time error.
        Please help as quick as possible.
    Regards,
    Sourav Paul.

    Hi,
    try following,
    DATA: GT_EVENTS TYPE SLIS_T_EVENT.
    INITIALIZATION.
    PERFORM BUILD_EVENTS CHANGING GT_EVENTS.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
               IT_EVENTS          = GT_EVENTS[]
        TABLES
          T_OUTTAB           = IFINAL.
    ENDFORM.                    " display_output
    FORM BUILD_EVENTS CHANGING GT_EVENTS TYPE SLIS_T_EVENT.
      DATA: LINE_EVENT TYPE SLIS_ALV_EVENT.
      CLEAR LINE_EVENT.
      LINE_EVENT-NAME = 'TOP_OF_PAGE'.
      LINE_EVENT-FORM = 'TOP_OF_PAGE'.
      APPEND LINE_EVENT TO GT_EVENTS.
    ENDFORM.                    "build_events
    Reward pts if usefull.
    Regards,
    Dhan

  • On clicking a button run external class which refrances main application

    I have a reader ReadXML and a Jframe Cpass, on clicking a button on Cpass, an new filechooser opens, this then fills the input jtextfiled12 . When clicking "load" button on cpass I need to send jtextfiled12.getText() to ReadXML (this runs, and updates mank text fields on cPass)... but I cant reference from a static context Cpass>>ReadXML>>Cpass.... so having a problem
    relevant cPass in cPass.java:
    public class Cpass extends javax.swing.JFrame {
    public static void main(String args[]) {
    Cpass C = new Cpass();
         C.show();
    public String getIn() {        return this.jTextField12.getText();         }
    relevant ReadXML in ReadXML.java:
    public class ReadXML {
    private void ReadInXML() throws IOException {
         String XmlInText = Cpass.getIn();
              BufferedReader allData8 = new BufferedReader(new InputStreamReader
    (new FileInputStream(new File( XmlInText)),"UTF8")); }
    Edited by: Mr_Tuition on Dec 5, 2007 3:44 AM

    but since cpass is already running from cpass, i cant reinitialise it, I need to used the insatance that is already shown, since it contains the infomation needed to pass to readXML
    public static void main(String args[]) {
       Cpass C = new Cpass();
       C.show();
       }When selectinfg a button on C (which selects the file location), that then opens readXML, I cant open a new version of Cpass (since this wont contain the infomation, eg the file the user has just chosen)
    I need to run Cpass
    Click a button that selects a file
    then file location is set in a text feild on Cpass
    on selecting "load" on Cpass, this runs readXML.java
    *readXML some how gets the file location from Cpass (which is still C.show();)
    the XML is read, and sent back to Cpass via:
              public String[] getStrAllData() {
                      return this.arrayXML;
             }One way arround thios is to copy the readXML function into Cpass but thats just messy
    Another would be to write out a "cookie" type file that saves the location, then readXML can use this .. less messy, but not what I wanted.
    Edited by: Mr_Tuition on Dec 5, 2007 4:42 AM

Maybe you are looking for

  • I want to set up my new iPad...Want to use same Apple ID as my desktop. Can I ?

    I want to set up my new iPad...Want to use same Apple ID as my desktop. Can I ?

  • Kernel Panic w/ 10.4.8

    After installing 10.4.8, I get a gray screen w/ restart message while booting. I am only able to boot in "safe mode" (i.e. holding down the shift key while booting). The local dealer says there is a conflict between 10.4.8 and some other extension. H

  • EXC_BAD_ACCESS - constant

    I have had innumerable EXC_BAD_ACCESS (SIGSEGV) exception errors since beginning to use this iMAC Retina two weeks ago in nearly every app: Photoshop, After Effects, Lightroom, Studio Artist, Handbrake, Cinema 4D... dozens. Given that nearly all my a

  • Add storage location field into report COOIS

    When i check the Production order Storage Location is showing under Goods receipt Tab.When i execute the order COOIS Storage location field is empty. Where and what to configure to pull storage location into report COOIS? Thanks Rafi

  • Very basic questions about hard drives

    I'm upgrading from vintage Beige G3, so much of the jargon about internal drives is new to me. My MacPro will come with an OEM 160 GB drive. I will use this for my primary boot drive -- OS and Apps. All my data, photo files etc. will be kept on my se