Alert Button for delete record ASP

Hello I have a delete record and have added a javascript
alert box. I have 2 options. The first is OK and the second is to
cancel. The problem is that I having trouble with the cancel part.
It deletes the record regardless. I tried to pass information such
as if they click cancel <% TH_Proceed = "" %> and in the
delete Dreamweaver code put an if statement to see if the
TH_Proceed <> "" to proceed.
It seems like once it is clicked the information from the
form to delete is passed and it forgets about what I try to send.
Sorry I am not to experienced with this.
Thanks for any help

<form, not </form
onSubmit = "return confirm_entry()"
If you don't return anything from the function call, the
submit will of
course go through since that's the default behavior.
The function itself must be altered, too. After your alert
saying the file
will be deleted, return true. After your alert saying the
file will not be
deleted, return false.
"Pixel Pusher" <[email protected]> wrote in
message
news:e8k38f$mtt$[email protected]..
> Thank you. But still not completely understanding. I
have details. Thank
> you
> again for the help.
>
> This is the form tag:
>
> </form id="frm_delete" name="frm_delete"
method="POST"
> onSubmit="confirm_entry()"
action="<%=MM_editAction%>">
>
> This is the submit button:
> <input type="submit" name="Submit" value="Delete This
File!" />
>
> This is the JavaScript:
>
> <script language="JavaScript">
> <!--
> function confirm_entry()
> {
> input_box=confirm("Click OK or Cancel to Continue");
> if (input_box==true)
>
> {
> // Output when OK is clicked
> alert ("The File Will be deleted");
> }
>
> else
> {
> // Output when Cancel is clicked Option
>
> alert ("The File Has Not Been Deleted");
> }
>
> }
> -->
> </script>
>

Similar Messages

  • Writing a store procedure  for deleting records

    how can i write a store procedure for deleting records from a table.
    i have a table called employees
    empid
    empname
    deptid
    and table department
    deptid
    dept
    floor
    how can i write a store procedure which would delete records of employees from employees table for particular department when i delete that department from department table.
    thanks

    872959 wrote:
    how can i write a store procedure for deleting records from a table.
    i have a table called employees
    empid
    empname
    deptid
    and table department
    deptid
    dept
    floor
    how can i write a store procedure which would delete records of employees from employees table for particular department when i delete that department from department table.
    thanksDoes not seem to be a sound design, to me.
    Employees do not go missing when organization change is made & department is eliminated.
    If you insist such nonsense, write TRIGGER to issue desired DML

  • Delta update for deleted records

    Hi,
    I use delta update for my data. As destination I use ODS object and this ODS contains two keys: key1 and key2. On step of preparing data for extraction, key2 is lost(we can't determine it) - key1 is known only.
    I'm finding a way how to update ODS by deleted records('D' update mode) if this records contain only key1 value(key2 is empty). I need to delete all records with key1 only, key2 is not important for this update.
    Is it possible to set key2 some BW specific value, which will be accepted as equal for old key2 values ?
    Or some other standart ways are known for this situation ?
    Thanks in advance,
    Fiodar.

    I would use the update rules to read the active data table of the ODS. There you can read all the key2 values for a given key1.
    If you get one row with key1 filled and key2 = '*' (for example you could split it into multiple records, one per key2. A sample coding might look like:
    LOOP AT DATA_PACKAGE into l_d_data_package.
      IF key2 = '*'.
        DELETE DATA_PACKAGE.
        SELECT * FROM /BIC/AMY_ODS00 INTO l_d_my_ods
          WHERE key1 = l_d_data_package-key1.   
          l_d_data_package-key2 = l_d_my_ods-key2.
          append l_d_data_package to DATA_PACKAGE. 
        ENDSELECT.
      ENDIF. 
    ENDLOOP.
    Best regards
       Dirk

  • Delta enable custom func mod data source for Delete record also

    Hi,
    We have a custom function module data source and the base table on which data is extracted has two time stamp fields ( created on, changed on ) and the data source is delta enabled with the timestamp field.
    It works aboslutely fine in Full and initial mode and load data into a target ODS.
    Even in delta mode we believe that it works in most of the cases( only change of an existing records and creation of new records). However in the case of delete, we have issues.  When the data is deleted from the base table we completely loose the record and can’t advice the BW which one to delete.
    In order to bypass this we have analyzed the cdhdr/cdpos table and found out that that we can compute the Key field value that was deleted from the last delta run and can include it as such in the data that are extracted.
    Big Question is by what mechanism we let the BW know that this is a delete, so that the existing record( with the same key) is actually deleted from the ODS. I have seen some fields like 0RECORDMODE doing things in SAP delivered  content. But not sure how we can get this work for our custom data source. 
    Please let us know whether you need any clarification on this. I shall be prompt to provide points who can resolved this showstopper issue for us.
    Thanks

    Hi Aruna,
    I have tried to explain : "Big Question is by what mechanism we let the BW know that this is a delete"
    Now to create a DataSource, you will have to include the information from the Tables as you mentioned:
    1: CDHDR
    2: CDPOS
    In this table you can check the CHANG_ID as the field which gives the information of
    1: Overwrite
    2: Add
    3: Delete
    Now when you create the Function Module, make a field similar to this and read the R/3 Table field CHANGE_IND and pass the relevant Indicators to the BW in the Transfer Rules
    Like
    CDHDR refers 'D' for delete but In BW 'R' denotes Deleted image. So the FM should take care this and pass the blank for all and 'R' for the documents with 'D' for each line item along with the other required fields.You will have to use an ODS in this case.
    note: Plz check the logic of Change Ind "E". I am not sure of this type.if you want to delete 'E' then pass the value as 'R' to the BW system for documents with 'E' CHANGE_IND.
    Hopes i made it clear.
    regards
    Happy Tony
    Points == Thanks

  • Cancel button for interaction records ICWC

    Hi experts.
    I want to add the standard button "CANCEL" for interaction records in ICWC interface. This button is enabled for the resto of transactions but not for the interaction record one. Do you have any idea?
    Regards,
    Pablo

    Hello,
    For CRM versions before CRM7.0, the only way to avoid Interaction record creation is to implement BADI
    CRM_IC_IARECORD. But be aware that it may have some negative impacts depending on the scenario you are using...
    Kind regards,
    Nicolas.
    PS: for CRM7.0 check out the release notes. It seems that a new "END" button has been introduced to avoid the interaction record creation...

  • In Earthlink Webmail, the "check all" and "delete" button for deleting multiple messages no longer function (although they work in I explorer).

    When using the webmail application for earthlink email, the "check all" option to select an entire page of messages at once no longer functions. Same problem with the "delete" buttons that are located at the top and bottom of the page with multiple messages. Consequently, the only way to delete a message is to open the message and delete it in that view -- extremely tedious if there are a lot of messages.
    This is a recent change, in the last few days. Everything works fine in I explorer. Earthlink support suggested I start Firefox in safe mode and restore firefox default settings. I went through the process on the help page. It didn't help.
    I'll provide the earthlink link, but it is my email page that is the problem.

    Same here.
    - select multiple mails with the SEARCH option (manually selecting seems to work fine)
    - click the move button
    - list of folders appears (witn account &amp; cancel options that both still work)
    - click on a folder
    - mail flies to this folder (animated)
    - list of folders remains visible
    - the cancel button does NOT work
    - the accounts button takes you back to the root "directory" of your accounts
    - in my case "live" and "exchange"
    - this screen is a dead end. Clicking on both the account names and the cancel button do not work
    A complete restart fixes the problem

  • Button for next recording in the database

    Hello,
    I currently testing Adobe LiveCycle to create a PDF form with data link to a database (Access).
    The goal of my form is for the manager of each of our site to write variable about the paycheck of each employe. So first I create my AccessDatabase with a simple structure :
    N : Auto Number
    Matricule : Employe ID
    Nom : Name
    Prenom : First Name
    Service : Service (Accounting...)
    HeureMensuelBase : Contract hour information for the mouth
    HeureSemBase : Contract hour information for the week
    Mois : Mouth
    Annee : Year
    NbrHeureMensuelW : Write the number of hour the employe work this mouth
    NbrHeureSupp25pc : Extra hour paid 25% more
    NbrHeureSupp50pc : Extra hour paid 50% more
    NbrHeureSupp100pc : Extra hour paid 100% more
    NomPrime : Name of a special gratification
    MontantPrime : Amount of a special gratification
    So after, I create my ODBC connexion and insite AdobeLiveCycle, Data View, Create a connexion > Next > ODBC String connexion > SQL Request > SELECT * FROM Table_Access; > Next > Finish. Great I retreive all my fields. If I preview the PDF I can correctly see the first record of my database.
    My goal is to create two differents buttons to navigate inside :
    NEXT with the follow code :
    formulaire1.#subform[0].Next::click - (JavaScript, client)
    xfa.sourceSet.DataConnection.next();
    PREV with the follow code :
    formulaire1.#subform[0].Prev::click - (JavaScript, client)
    xfa.sourceSet.DataConnection.previous();
    If i try to preview it, unfortunatly no button works.
    I follow this video : http://www.youtube.com/watch?v=C56_Cz-aE0c
    I  see the Adobe FAQ too : http://help.adobe.com/en_US/livecycle/11.0/DesignerHelp/WS107c29ade9134a2c-1f4d3e3c12a7df3 f73e-8000.2.html
    Could help me ? Adobe Support don't want help me because I use a trial version for the moment (logical because my CTO wan't valide LiveCycle do the job before paid for it). Sorry for my english it's not my mother tongue.

    I'm not alone in the same situation : http://forums.adobe.com/thread/793214
    Please support help us

  • Help needed writing trigger for deleting records from multipul tables

    i am trying to write a trigger which would help me delete the record from 3 different tables
    lets say i have table a , b and c
    i an trying to write a trigger which would help me delete the same record from table a and c.
    drop trigger az_zzz_trigger;
    create trigger az_zzz_trigger
    before INSERT or UPDATE or DELETE ON az_employ
    FOR EACH ROW
    BEGIN
    IF DELETING then
    delete from za_payroll
    delete from az_salary_audit
    end if;
    end;
    while executing this trigger all data of table za_payroll is delete.
    what should i do so that only the record which i delete from az_employ gets deleted from az_payroll and az_salary_audit

    872959 wrote:
    i am trying to write a trigger which would help me delete the record from 3 different tables
    lets say i have table a , b and c
    i an trying to write a trigger which would help me delete the same record from table a and c.
    drop trigger az_zzz_trigger;
    create trigger az_zzz_trigger
    before INSERT or UPDATE or DELETE ON az_employ
    FOR EACH ROW
    BEGIN
    IF DELETING then
    delete from za_payroll
    delete from az_salary_audit
    end if;
    end;
    while executing this trigger all data of table za_payroll is delete.
    what should i do so that only the record which i delete from az_employ gets deleted from az_payroll and az_salary_auditutilize appropriate WHERE clause

  • Start routine code for deleting records in different language

    Hello,
    can someone please specify the exact code to be used in start routine, and whre exactly it needs to be pasted?
    this code is needed for master data notifaction type which is loaded for both languages German and English.
    german records are to be avoided.
    thanks,

    Ciao Claudio,
    this issue about languages selection is an old situation...
    The problem is that language selection is not possible, even if you have this field checked for selection !!!
    Look at OSS Note 324684...
    "If a field of a DataSource - typically with field name 'LANGU' or 'SPRAS' - is assigned to InfoObject '0langu', the field is not provided in the selection fields although the field actually can be selected. In this case, all languages of the language vector active in the BW System are requested by the source system but the language selection cannot be defined in the Scheduler.
    A precondition is that the language field of the DataSource in the source system is maintained as selection field. This setting is done in Transaction RSA6 (or RSO2 for customer developments)."
    Bye,
    Roberto

  • Hot to remove button for a particular record in ALV lvc version

    Hi,
    i have created ALV using
    'REUSE_ALV_GRID_DISPLAY_LVC' function module, in which am displaying buttons in a colomn.
    Now i want to remove the button for few records based on some condition.How is it possible.
    Regards,
    Manoj.

    Hi Susan,
    Thanks for the reply.
    i have tried the same but still all the buttons are coming.
    please find the below code which i have written.
    TYPES: BEGIN OF ty_output, 
                  comm(50)   TYPE c,                 
                 order(14)  TYPE c,             
                 button      TYPE lvc_t_styl,
    end of gtyp_data1.
    data :lt_style   TYPE lvc_t_styl,
             ls_style   TYPE lvc_s_styl.
    *for the field catlog
    ls_fieldcat_lvc-fieldname = 'ORDER'.
    ls_fieldcat_lvc-scrtext_m = 'Order'.
    ls_fieldcat_lvc-tabname = c_out.
    ls_fieldcat_lvc-style = cl_gui_alv_grid=>mc_style_button.
    APPEND ls_fieldcat_lvc TO it_fldcat_lvc.
    loop at it_output INTO ls_output.
    clear ls_style.
        if ls_output-shortsr = 'HGR'.
          ls_style-fieldname = 'ORDER' .
          ls_style-style = cl_gui_alv_grid=>mc_style_button.
         APPEND ls_style  TO ls_output-button.
          ls_output-order = 'Order it Now'. 
       else.
          clear ls_style.
          ls_style-fieldname = 'ORDER' .
          ls_style-style = cl_gui_alv_grid=>mc_style_disabled.
          APPEND ls_style  TO ls_output-button.
       endif.
         MODIFY it_output FROM ls_output.
    ENDLOOP.

  • I want an information to retrive deleted records for a sales order.

    Hi technicals,
      This is suresh.I need a help from you .
    I have designed a BAPI which is going to retrive the New records ,updated records for a particular sales order based on the sales organization.But when i am trying to retrive the data for deleted records it's not getting any data.
      Is it possible to get the deleted records for particular sales order based on sales organization.
    if it is possible ,then let me know whether there is any function module to get the
    deleted records based on sales organization.
    Please help me to solve the problem.
    Thanks in advance,
    suresh..

    I'm not aware of a FuMo
    SAP deletes VBAK hard on database. Only trace in ChangeHist is possible.
    Ask Table CDHDR & CDPOS for those...
    OBJECTCLAS = VERKBELEG, OBJECTID = vbeln (leading zroses!), TABNAME = VBAK, CHNGID = D
    SalesOrg not identificable out there...
    Have fun ! Not points wanted!

  • Delete record behaviour (PHP/mySQL)

    I've just worked through this whole database thing from
    scratch again after a little glitch, and it's all working pretty
    well.
    I do still have the issue with deleting records - I have the
    search results page which is fine, and has a delete options at the
    end of the row.
    It was working just fine bringing up the 'confirm deletion'
    page with the selected record - but it goes wrong after I add the
    'delete record' server behaviour.
    Basically after I do, when I click delete in the results
    page, it skips the 'confirm deletion' page, going straight to the
    'deletion confirmed' page. It's as tho' simply going to the
    confirmation page is triggering the deletion, rather than requiring
    the 'delete record' button to be pressed. Does the form / button
    require an 'action'? Although as far as I can tell I followed the
    instructions
    correctly, but something is going wrong on the confirmation page.
    It does still delete the record at least, but it would be
    good to have the confirmation page.
    Here's a link (if you need to log in use 'admin' and
    'password'.)
    link
    This is all the script code in the 'confirm delete' page :
    <?php require_once('../Connections/ConnHandprint.php');
    ?>
    <?php
    function GetSQLValueString($theValue, $theType,
    $theDefinedValue = "", $theNotDefinedValue = "")
    $theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue)
    : $theValue;
    switch ($theType) {
    case "text":
    $theValue = ($theValue != "") ? "'" . $theValue . "'" :
    "NULL";
    break;
    case "long":
    case "int":
    $theValue = ($theValue != "") ? intval($theValue) : "NULL";
    break;
    case "double":
    $theValue = ($theValue != "") ? "'" . doubleval($theValue) .
    "'" : "NULL";
    break;
    case "date":
    $theValue = ($theValue != "") ? "'" . $theValue . "'" :
    "NULL";
    break;
    case "defined":
    $theValue = ($theValue != "") ? $theDefinedValue :
    $theNotDefinedValue;
    break;
    return $theValue;
    if ((isset($_GET['recordID'])) && ($_GET['recordID']
    != "")) {
    $deleteSQL = sprintf("DELETE FROM Contacts WHERE
    ContactID=%s",
    GetSQLValueString($_GET['recordID'], "int"));
    mysql_select_db($database_ConnHandprint, $ConnHandprint);
    $Result1 = mysql_query($deleteSQL, $ConnHandprint) or
    die(mysql_error());
    $deleteGoTo = "contactdeleted.php";
    if (isset($_SERVER['QUERY_STRING'])) {
    $deleteGoTo .= (strpos($deleteGoTo, '?')) ? "&" : "?";
    $deleteGoTo .= $_SERVER['QUERY_STRING'];
    header(sprintf("Location: %s", $deleteGoTo));
    $colname_Recordset1 = "1";
    if (isset($_GET['recordID'])) {
    $colname_Recordset1 = (get_magic_quotes_gpc()) ?
    $_GET['recordID'] : addslashes($_GET['recordID']);
    mysql_select_db($database_ConnHandprint, $ConnHandprint);
    $query_Recordset1 = sprintf("SELECT * FROM Contacts WHERE
    ContactID = %s", $colname_Recordset1);
    $Recordset1 = mysql_query($query_Recordset1, $ConnHandprint)
    or die(mysql_error());
    $row_Recordset1 = mysql_fetch_assoc($Recordset1);
    $totalRows_Recordset1 = mysql_num_rows($Recordset1);
    ?>
    Any ideas?
    Cheers

    Hello,
    S. Khawar wrote:
    my question is that when I execute DELETE_RECORD built in it fails due to constraint restriction and Oracle forms raise message that "Child record exist/unable to delete record " until here it's Ok but Oracle Forms still removes record from the screen/form and move up the remaining records(although record is failed to delete).Yet this is the default forms behaviour. Because when you press delete it will remove from the screen but not from the database till you use COMMIT as francois mentioned.
    I want the Oracle Form to do not remove record from screen/form once it's failed to delete record actually.Yes, for this type of requirement. Why don't you check dependency of record before removing the record. What i mean is you can use the code in KEY-DELREC trigger like below (before using the DELETE_RECORD built-in) for checking if child record exists then show message otherwise remove. For example...
    DECLARE
      vCntRec NUMBER;
    BEGIN
      SELECT COUNT(*)
      INTO vCntRec
      FROM child_table_name
      WHERE key_column = :form_key_column_name;
      IF vCntRec>0 THEN  -- Here means record found in child table so it will not remove from screen but message will appear.
        MESSAGE('<Your error message goes here...>');
        MESSAGE('<Your error message goes here...>');
        RAISE FORM_TRIGGER_FAILURE;
      ELSE  -- Here mean there is not dependency so it will remove which is default forms behaviour.
        DELETE_RECORD;
      END IF;
    END;So, when you will press button for delete first it will check for any child record if exsits then it will display message and will not vanish from the screen otherwise it will remove from the screen and furthor COMMIT will remove from database.
    -Ammad
    Edited by: Ammad Ahmed on Jul 7, 2010 8:48 AM

  • Delete records in a report with a popup

    Hi.
    In my report, the first column contains edit buttons for each record. Now, the second column should provide a delete button for each record. Is it possible to create a popup window that comes up if the user presses the button and ask to submit and to cancel? And after a submit, the record is deleted from the database and the page refreshed? How do I create this popup and the process?
    Thanks in Advance for your help.
    Stephan

    Hi Denes.
    Yes. Your example makes exactly that what I'm going to try. I had a closer look at the settings of your page and tried to transfer it to my problem.
    Unfortunately, it don't work and I don't know why.
    the URL with the javascript popup is:
    javascript:confirmDelete(htmldb_delete_message,'f?p=&APP_ID.:3010:&SESSION.:DELETE:&DEBUG.::P3010_DELETE_ID:#ACT_ID#');
    The debug modues displays the following messages:
    A C C E P T: Request="f?p=100:3010:4471084058876053:DELETE:YES::P3010_DELETE_ID:22"
    S H O W: application="100" page="3010" workspace="" request="" session="4471084058876053"
    ...Session State: Save "P3010_DELETE_ID" - saving same value: ""
    If I use the page as target of the button with the request value and the setting of delete_id it works but without a popup confirmation dialog.
    I have nearly done it like in your example. What could be the problem?
    Thanks for help
    Stephan

  • To find out the list of user profiles marked for deletion using powershell or C# for SharePoint 2010

    I have Disabled the MysiteCleanup timer Job and disabled few user profile accounts in AD.  Then in SharePoint user profile service, ran the User profile full synchronise job.
    I am able to find the marked for deletion records from the table (UserProfile_Full) in SQL server and also in the Manage User profile menu of the central admin under "Profile missing from import"
    view.  But  am not getting these records, If I execute the  below powershell command.
    $upa = Get-spserviceapplication -name 'User Profile Service Application'
    Set-SPProfileServiceApplication $upa -GetNonImportedObjects $true
    This command shows only the system account and not the accounts, which are marked for deletion .
    Please suggest how to get this result.
    Thanks & Regards,
    Yoga

    What result do you get hen use use type below in powershell
    $upa

  • DTP Indicator Only Get Delta Once: How to handle deleted records in source

    Hi colleagues,
    I have checked some messages and blogs, but could not find any solution for deleted records in source system.
    My source system is not able to delivere delta for my table of interest. So I checked "Only Get Delta Once" in my DTP and made some tests.
    It works very well for changes of existing records of the source table.
    But, SAP help on this features wirtes:
    ...If this is not logically possible because, for example, data is deleted in the source without delivering reverse records, you can set this indicator and perform ...
    I checked this feature by selecting less data from source at the second load from the same table. But recordmode does not get an deletion flag for the now missing records. So, the indicator "Only Get Delta Once" does not work like BI standard delta mechanism?
    What is wrong?
    Thanks and regards,
    Wolfgang

    Hi,
    If you select the option 'Only get delta once', then every request in the PSA will only be loaded into the Data target once. For example. If you load a full request into the PSA through an InfoPackage and then load it to the Cube. In a snapshot scenario, when the new full load comes to the PSA you will need to delete the previous request from the cube before loading the new request.
    But if you delete the previous request from the cube, and not from the PSA - and if you haven't checked the 'Only get delta once' flag, when you execute the DTP, it will load both previous and the new requests from the PSA to the cube. In order to avoid this you have 2 options:
    1. You can delete a request from the PSA after every successful load into the Cube OR
    2. You can check the 'Only get delta once' flag in the DTP so that it won't load any request it has loaded into the cubes previously even if it was deleted from the cube.
    Using the second option de-couples the PSA maintenance from your regular data loading and also saves you an additional step of deleting the PSA request in your process chain.

Maybe you are looking for

  • Opening Premiere Elements 10 files from PC on a Mac

    I am using Premiere elements 10 files from PC on Mac OS Mtn Lion saved as .prel  and get message "this project is not compatible with current version of Premiere Elements".  Please help.  thank you.

  • Problem with wireless nenetwork

    Can someone please help me set up this wireless network on my 6500 all in one.  It worked before and suddenly lost its mind.  I am unable to sync the ip addresses and/or do that MAC thing.  It is being used on a stupid verizon "D" router thing, and I

  • Kingston HyperX ram short lived!!

    That was short lived! I stuck my 2 old pieces of ram in with my new and it would not boot and no signal to the monitor. I had to take the new ones out and clear cmos and then stick my old ones back in to get it to boot. By brand new ram is now toast

  • MBP superdrive does not accept commercial audio cds

    Hi people, My superdrive mostly does not accept commercial audio cds when i keep on trying it accepts them sometimes but you cannot say under which circumstances. I already tried to resolve this with a "reset -all" in the single user mode but this ju

  • Appear effect problem

    Forgive me if the solution to this problem has been posted - My search didn't work. I have applied the appear behavior to the body of my page and it is not working properly. When it loads it seems to flash everything first and then the appear effect