Delete buttons in report region & javascript

I managed to add a delete button on each line of my report region using 'Column link' with
text <img src="#IMAGE_PREFIX#delete.gif" border="0" alt="Verwijderen Icon">
url f?p=&APP_ID.:504:#APP_SESSION#:TEST:::P504_DELETE_ID_LCNT:#ID#
and some extra coding.
problem is : i'd like to add a javascript:confirmDelete function
In a 'Normal' button you can add it via URL Target.
Can anyone help me ?

This seems to be the way to add javascript to the url-code
f?p=&APP_ID.:504:#APP_SESSION#:TEST:::P504_DELETE_ID_LCNT:#ID#" onClick="javascript:confirmDelete('Are you sure....')
The only problem now is to add some kind of code to javascript to cancel further processing??????
return true or false has no effect.
I tried to set the REQUEST-value but i can't find the solution.
Please help.

Similar Messages

  • Enhancement request: Buttons in report regions

    Buttons in Report regions (usually) operate upon the data shown in the report using form input elements like checkboxes, radiobuttons, etc.
    When the report returns no rows, the buttons look silly in an empty report region. Clicking them might also do some harm depending on what the after-submit processes do.
    IMHO it seems like a worthwhile enhancement for Apex to automatically suppress the rendering of the buttons if the report returns no data (it could piggyback upon the 'No Data Found' message under Report Attributes).
    Thanks

    Or maybe conditionally? I can think of a case where I get no data back and I want to do something with those buttons, such as "create a new record". I often use form input elements there as filters, so it's possible for our users to come up with a combination of filters that comes back with "no data found" and they need a way (mmmmmm, buttons) to reset the filters and get back to something meaningful.
    But the ability to condition the buttons (and other stuff) based on whether or not the report returns data? That could be useful, especially for the situation you describe where clicking them might do harm. The ability to disable the buttons on "no data found" (while still displaying them) could also be nice. That way I could display the buttons and keep the same layout, but they wouldn't be clickable.

  • Button on report region

    Hi..
    i want to add button on report region Named ad "Send E-mail"
    that should be on each row
    so how can i do??
    Please Suggest Me
    Thanks in advance

    969091 wrote:
    yes bt
    m not gettingLet's say I have a sample classic report on the EMP table as:
    select
    empno,
    ename,
    sal,
    hiredate
    from emp
    order by 1Now, I want to add a column "Send Email" to the report that will carry a link icon for every row. I modify the query as:
    select empno,
    ename,
    sal,
    hiredate,
    '' as send_email
    from emp
    order by 1Now, I can right-click the "send_email" column and select edit. In the "Column Link" region, I choose a link icon for the column and define target page/URL.
    For interactive reports, you can right-click the report, select "Edit Report Attributes" and use the "Link Column" option also.

  • Delete  'button' on report how to do this?

    Hi,
    I have a requirement to implement a 'delete' button on a report, but cannot find out how to do it. I found the following site which does exactly what I want, but cannot get to the code to see how the author has done it can any one assist please?
    http://apex.oracle.com/pls/otn/f?p=40323:32:689305137368050
    Thanks inadvance.

    Hello:
    Let's assume your report query is something similar to
    select empno,ename from emp
    You do the following
    In the Column Attributes for report set the column-link for the 'empno' column to redirect to a URL
    Set the URL to be
    javascript:doDelete(#EMPNO#);
    Create a button named 'DELETE'. Set the button to submit the page and branch back to the same page. Set the button's condition to 'Never'
    Create a page-item named 'P1_EMPNO' of type hidden
    Create a 'On Submit' pl/sql page process that is conditional on the 'DELETE' button with the following code
      delete from emp where empno=:p1_empno;Add the following javascript in the HTML header <script>
    function doDelete(empno) {
       if (confirm('Delete employee ' || empno)) {
          $s('P1_EMPNO',empno)
         doSubmit('DELETE')
    </script>varad

  • Export for all rows of a Report Region

    Hi,
    I have a html region with a query button to restrict which rows get selected in a reports region below it.
    But I also want to have a link to export all rows in the report to a csv file. Button the report region may already
    have selected data in it that is not necessarily all rows in the report. Thus I guess I am wondering if I should
    create a whole separate hidden report region that will always select all rows in the query to relate the
    export link to? Or if I can someone use the current report region and select all rows for the export but
    not requery or change the currently displayed report regions results?
    Thanks in advance!

    Yes I just created a hidden report i.e. one with all columns set to
    APEX_APPLICATION.G_EXCEL_FORMAT = TRUE
    And then just create a javascript function to call the export routine...

  • Delete button doesn't seem to use branch to return to page

    I have set up a single update form with multiple report pages pointing to it. I did this using the basic report / form option, so the create button is on the report linking to the form along with an edit button to the form for update and delete. There is also a cancel button on the form.
    After perusing the forum, I set up an item on the form to accept the passed page number of the various report pages and set the unconditional branch back to this button value. This works well for create, update and cancel. They all return nicely to the originating page.
    However, the delete button has the standard javascript popup asking for verification of the delete. That pops up, the record gets deleted and I get the action processed message, but I don't get back to the originating page - instead I get an error "Error ERR-1016 Application "122" Page "0" not found (requested language="en-us") which appears to say it isn't referencing the item for the return page. I know the item has the correct value because it is not currently hidden for testing.
    The branch point is on submit after processing and pointing to a page in the application with value of &P3_BRANCH_TO.
    If I replace the URL for the javascript popup in the delete button with the link to the item, I don't get the delete at all. It just goes back to the originating page. So the javascript does more than just give a popup.
    How can I get around this situation?
    TIA
    Gillian
    PS - this forum is great - it has been very useful for this newbie.

    Hi Gillian,
    The "reset page" process is there to remove from the session the values of all items on the page. In most cases, this is ok as this is what you would want to do. In some cases, however, this can cause problems. In your case, because your P3_BRANCH_TO item is on the same page, then it was also being cleared out along with the rest of the data, so when the branch was attempting to read it, the value was actually null rather than an actual page number.
    There are two things you could try, to ensure that you clear out the session values that you don't need but keep the ones that you do.
    1 - Put the items you want to keep on another page where possible or create Application Items (through Shared Components) and set these values instead. I do this for my G_RETURN_PAGE item (which I think is similar to what you are doing with your P3_BRANCH_TO item) - I set this value on my base pages (the pages that the user needs to return to after performing any action) and then use &G_RETURN_PAGE. in the branch. As "reset page" only clears data out of pages, any application item is not affected, so will always be available.
    2 - In your branch, you can set the value back to itself. So, the "Set these items" setting would have P3_BRANCH_TO and the "With these values" would have &P3_BRANCH_TO.
    Andy

  • Delete button control: Javascript confirm & redirect?

    Hello all,
    I have a contract details page that has the following buttons: Save, Cancel, Delete. The Cancel button has a general redirect assigned to it, since no processing is necessary. As for the Save button, the page submits to itself, so the screen just reloads quickly, with a note to show the record was updated. As for the delete button, I don't want the user to remain on a details page for a contract they just deleted, so I wish to redirect the user to my contract search page after the record is deleted. I also want to have the button confirm the deletion before proceeding.
    My current page setup is as follows:
    SAVE button (template based)
    Optional URL Redirect - No Target
    DELETE button (template based)
    Optional URL Redirect - Page 3 (contract search)
    "Request" and other fields here are empty
    CANCEL button (template based)
    Optional URL Redirect - Page 3 (contract search)
    "Request" and other fields here are empty
    BRANCHES Information:
    Before Validation:
    DELETE:
    Target type - page in application (3 - contract search)
    Request - DELETE
    When Button Pressed - BTN_DELETE
    After Processing:
    Target type - page in application (2 - contract details)
    When Button Pressed - BTN_SAVE
    Here's my dilemma...under the setup listed above, clicking Delete redirects me to the search page, but the record is not deleted (I do have a DML process set up for Insert/Update/Delete, set up for After Submit). I've tried changing both the button and/or branch properties to set up URL processing, entering javascript to confirm the deletion. No matter the combination I use, either the contract will not get deleted, or the deletion is a success, but I get an error message that there is no branch page set up for that. If anyone has suggestions as to how I can get validation to play nicely with deleting records, it would be much appreciated.
    Thanks,
    Brian

    Mike,
    Is it possible that you have more than 1 branch to the target page? yes I do, before I had the Unconditional branch on top. Now I moved the conditional branch to the top. Redirect is working fine but no luck with passing values. After some research I found that it passes the request value when I send it as a string but not as value of the item on page. This may have something to do with in-built Delete procedure.
    I am very new to Apex/Oracle and I don't know how to create a oracle workspace and post my App on line. So, I am giving a detailed description of what I am trying to achieve. please bear with this while I try to figure out how to post it on line.
    This is exactly what I am trying to do.
    On the first page I have multiple regions to show different reports based the user selection. User clicks a button to make a selection. I am toggling between the regions depending on the request value from the button click.
    If the user decides to modify a record he is directed to a form. After modifying I want the user to come back to the first page and be in the same region where he was initially.
    To achieve this
    --- I am passing the request value from the first page to the form and saving it in a hidden variable. In the unconditional branch I am passing that value back and it is working fine.
    --- Only for the Delete operation I have problems. I still want to have the Alert so I am using the javascript:confirmDelete(htmldb_delete_message,'DELETE'); in the Delete button URL.
    I created a conditional branch which has lower sequence than the unconditional one.
    I have set the condition as Request = Expression 1(DELETE) not the button click.
    In the Action part, i have the following
    Target type Page in this Application
    Page: 21
    Request: &P21_Old_Request.
    Clear Cache
    Set these items P21_Item1
    With these values &P22_Item1.
    I have seen that page redirect is working fine.( I tried to redirect to other pages it works fine). Only the values are not passed. I tried to pass these values as Application level items even then it doesn't do anything. But if u pass the string directly it would pass the string. But I want to be able to pass the value as an Item from the form.
    As I mentioned before it may be to do something with in-built Delete procedure.
    Is there way to see the SQL of that procedure?
    Do u have any suggestions for me?
    Thanks in Advance.
    Nimmi

  • Unable to delete a row using checkbox on report region

    hmm..this used to work, and unfortunatly this is code unfamiliar to me. We have a report region containing a list of records. The last column is a row selector, and is a check box. Several rows may be checked and then a delete button pressed.
    we receive the following error: ORA-20001: Error in multi row delete operation: row= 394878, ORA-01403: no data found,
    multi row operation failed
    however, the key that it references 394878 is not that of the record I had checked, rather it is the first record in the report.
    so...not able to delete, and it is trying to delete the wrong record. Any ideas. thanks

    Check the table name in your MRD process and make sure it's the right one. Also ensure the "checked" value of the checkbox is correct (i.e.: is the checkbox based on the correct key column from the report?).

  • Delete row from report and refresh region

    Hi
    Using apex 4.0
    I have a requirment like on one page there are two regions.
    There are two text boxes and insert button, by setting value into text box and pressing insert button data is saved in one table.
    And second region is for report which is selecting data which was inserted in first region. It is working correctly. Now in report region,
    there should be delete link/button to delete particular row and refresh that region.
    I have created delete link in second region and called java script function to delete from table. However that region is not refreshed and showing
    old data.
    I have tried with dynamic action to refresh region. But i am not getting sequence it is treating, first java script function will be called and then
    dynamic action will be executed or what? Because dynamic action is not refreshing region.
    Please let me know correct way to implement this requirement or correct me in my steps.
    Thanks in advance

    hi om,
    I had a similar issue.
    I am using a sql query to delete.
    "delete from dbo.[@XX_TDL1] " & _
                "where LineId = " & CStr(rownum) & " and code = '" & pAddonVars.TDHCode & "'"
    It's not pretty but it works.
    jw

  • Javascript calling not working properly in report region

    Hi All,
    I know it is quite simple question but i am unable to do this. In one tabular form with one blank row i have to put client side validation (javascript) so that user cannot enter nonnumeric value and value should be of min 5 digit.
    How i proceed:
    1: Have written two javascript function:
    function numOnly3()
    if(!((event.keyCode>=48)&&(event.keyCode<=57)))
    event.keyCode=0;
    alert("Enter Only Numeric Values");
    //event.focus();
    else event.keyCode = event.keyCode;
    function validateNumber3(itemValue)
    if((itemValue.value).length<5)
    alert("Please Enter 5 digit Value for the Part List Group");
    itemValue.focus();
    return false;
    2: calling these function in report region like :
    htmldb_item.text (16, parts_list_group, 10,5,'onKeyPress=numOnly3(); onBlur=validateNumber3(this);') parts_list_group
    after union :
    htmldb_item.text (16, NULL, 10,5,'onKeyPress=numOnly3(); onBlur=validateNumber3(this);') parts_list_group
    problem:
    when i am enetring non numeric valuse first its giving alert message "Please Enter 5 digit Value for the Part List Group" after clicking ok its giving alert message "Enter Only Numeric Values";
    but what i want in case user is enetering non numeric it should delete and alert
    "Enter Only Numeric Values" but first it is alerting "Please Enter 5 digit Value for the Part List Group" then after clicking ok alerting "Enter Only Numeric Values".
    if i am enetring 3 digit only then its giving correct message that "Please Enter 5 digit Value for the Part List Group".
    so my requirement is in case any user is entering non-numeric data including dot symbol then it should delete and pop up message that "Enter Only Numeric Values".
    may be calling function in the region wroung. can any one suggest me where is wroung and what should i do?
    Thank You,
    Amit

    Clear the cache and the cookies from sites that cause problems.
    "Clear the Cache":
    *Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    "Remove Cookies" from sites causing problems:
    *Tools > Options > Privacy > Cookies: "Show Cookies"
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    This may be caused by a recent Flash 11.3 update.
    See:
    *https://support.mozilla.org/kb/keep-flash-up-to-date-and-troubleshoot-problems
    *https://support.mozilla.org/kb/flash-crashes-or-does-not-load-firefox-13
    *http://forums.adobe.com/thread/1018071?tstart=0
    *http://blogs.adobe.com/asset/2012/06/inside-flash-player-protected-mode-for-firefox.html

  • Center the buttons in the reports region

    I have 2 buttons with Button Position as "Top and Bottom of Region".
    Button Alignment is "Right"
    How do I position the Button Alignment to be "Center" ??
    Thank you, Bill

    Hi,
    I created a copy of "Reports Region" template and adjusted buttons:
    Moved CREATE and CREATE2 tags to extra rows in the BODY table.
    Worked great!
    [td class="t2ButtonHolder" valign="bottom" >#CLOSE#   #PREVIOUS##NEXT##DELETE##EDIT##CHANGE##EXPAND##COPY##HELP#[/td>
    [/tr>
    [tr>[td align="left" valign="bottom">#CREATE#[/td>[td align="left" valign="bottom">#CREATE2#[/td>
    [/tr>
    [tr>
    [td align="center" class="t2RegionBody" valign="top" colspan="2">#BODY#[/td>
    [/tr>
    [tr>[td align="left" valign="bottom">#CREATE#[/td>[td align="left" valign="bottom">#CREATE2#[/td>
    [/tr>
    [tr>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Two reports's entries to the same form, the DELETE button works unproperly.

    I have two reports refrencing one form in which I have one item whose value is set by the refrencing report. In the form I build two branches back to the two resports by the item's value(conditional branch). when press the SAVE or CREATE button all work properly. But when press DELETE button, it seems the system clears all caches so that the item loses value. Then my two branches don't work. If I change "Javascript:apex.confirm..." to "Javascript:confirmDelete('...');" ,the two branches work, but the validations are always working, even if I change then validation option to "No". Can anyone help me? Thanks.

    I have found the answer.

  • Adding update and delete buttons to a  Report from SQL Query

    There is an option when creating a QBE to add update and delete
    links which i find quite useful, but this option doesn't seem to
    be possible on a Report from SQL Query. Do i need to do
    something special to add them? is the option located in a
    different place?

    Hi,
    You can only add Update ,Delete in QBE Reports,
    there is no option in Portal which can be used to
    have these buttons in the Reports from Query Wizard or
    Report from SQL Query.
    Thanks
    Vineet

  • Placing buttons in a region displaying an Interactive Report

    Hi,
    I have a page on which I am displaying an interactive report.I would like to place buttons on this region where the report is displayed-
    - The first button right of the search bar of the interactive report
    - The second button right of the first button.
    - The third (exactly ) below the second button (still right of the search bar)
    I am aware that if this where an HTML region,then I would have had the flexibility to place the third button in a new line without a problem,but can I achieve this in a region displaying an interactive report?
    Is there any way to do this?
    Regards,
    Priya Jetley

    Create the buttons as region buttons in the IR region, with the following properties:
    Button Position: Right of Interactive Report Search Bar
    Button Alignment: Left Right
    Enter *style="display: block; float: right;"* in the Button Attributes of the third button.
    Edited by: fac586 on Nov 11, 2008 8:04 AM
    Changed to fix slight layout glitch in Firefox 2.
    Edited by: fac586 on Nov 11, 2008 9:06 AM
    Changed back as the slight glitch in FF2 is preferable to not working in FF3 and Safari

  • Using Javascript in a report region

    I have a text box that I need to populate with an amount for billing. There is also a field that shows the amount due. If the amount due is equal to the amount being paid, I want my user to click on the amount due, and it automatically populates the amount being paid. I am using the javascript:setValue('destination','origination'); command, but the problem is that I am unable to choose the text field in the javascript. I have tried using #value# aliasing, and htmldb_application.g_f0x and just f0x... nothing seems to properly alias the text box within the tabular form. Any ideas?
    Thanks,
    Scott

    Scott,
    I know a way to do this, but it is not an easy implementation and it is quite hard to explain. Carl is an Oracle guy so he may know of a better solution, but here is what I came up with on my own:
    First let's be familiar with the htmldb_item syntax (found in the html db documentation):
    HTMLDB_ITEM.TEXT(
    p_idx IN NUMBER, -- unique id
    p_value IN VARCHAR2 DEFAULT NULL, -- value of item
    p_size IN NUMBER DEFAULT NULL, -- HTML tag attributes
    p_maxlength IN NUMBER DEFAULT NULL, -- max length
    p_attributes IN VARCHAR2 DEFAULT NULL, -- HTML elements including where you incorporate the javascript for this item
    p_item_id IN VARCHAR2 DEFAULT NULL, -- id you can specify
    p_item_label IN VARCHAR2 DEFAULT NULL) -- labe you can specify
    I would create your report region using the following sql statement:
    select order_number "Order Number",
    name "Name",
    amount_due "Amount Due",
    lpad((ROW_NUMBER() OVER (ORDER BY order_number)),4,0) "Row Num",
    htmldb_item.text(7,amount_paid,null,null,null,'f07_'||lpad((ROW_NUMBER() OVER (ORDER BY order_number)),4,0) "Amount Paid"
    from tbl_orders
    where....
    order by order_number
    --i had to use an order by to get the ROW_NUMBER() to work
    This will create on every row an item that is specific to the row number. For example:
    Row # Amount Paid text box item ID
    1 f07_0001
    2 f07_0002
    500 f07_0500
    etc.
    This will allow you to reference items based on what row they are when using javascript.
    Next you need to create a link out of the the amount_due column. Go to the Report Region, then the Report Attributes tab. Click on the edit link for the amount_due column. Go to the Column Link section.
    Make link_text = to the value of amount_due column(#amount_due# probably)
    Make the Target = URL
    Make URL = javascript: setValues('#AMOUNT_DUE#','#ROW_NUM#');
    This will send the value of amount due and the row number.
    Here's the javascript you would put in your HTML Header on you Page Attributes:
    <script language="JavaScript1.1" type="text/javascript">
    function setValues(due, rownum){
    document.getElementById('f07_'+rownum).value = due;
    </script>
    Give that a shot. I just created a page and got that to work.
    Chris

Maybe you are looking for

  • IWeb and a new domain

    I've read through many posts re: iWeb domain files vanishing, which happened to me (guess who'll be adding domain to his backup schedule...). Here's my question: Is there a way to create a new domain file? The one in my app. support file is a new (bl

  • How do I change the default storage file for PDFs?

    I want to save PDFs. Now the default files are in AppData/Local/Microsoft/Windows/Temporary Internet Files/Content IE5/V6ZGH08N. I have to drill UP through all those to get to where I want to save the item in PDF Files. How can I change the default?

  • Excel Insert worksheet

    I am having trouble trying to insert an excel worksheet from one workbook into another workbook. None of the excel functions seem to work for me and I am having a problem trying to find a good example. Basically what my program does is it will collec

  • How to render Inline scrollbars for a table

    Hi All, I'm using a large table with nearly 30 columns with the width property of the table set to 2200 and No wrap is set to TRUE on all the columns. Is there any possible way to render inline horizontal scrollbar for the table instead of rendering

  • Camera screen crash

    my screen flashes purple stripes when i use the camera. it also turnes very hot but my camera is not working. it is the second time now, the first time i got a new iphone