DoSubmit('UPDATE')

I have a button called UPDATE on the screen.
I want to use javascript to do same thing as click at UPDATE button.
Here is what i did in my javascript,
doSubmit('UPDATE');
but it doesn't work.
Did I miss anything?
Thank you.

I have a button GOHOME on the screen.
If I click GOHOME, a popup message box to ask yes or no. If yes, I want to do some function which is same as clicking on UPDATE Button (or I can run a update query), then do GOHOME. If no, just do GOHOME without updating.
I did this doSubmit('UPDATE'), but this doesn't work.
Thank you.
Edited by: user628655 on Nov 2, 2009 8:39 AM

Similar Messages

  • JavaScript to call update button

    I have a button called update. This button is used to update table based on the changes on the screen.
    I have a javascript and I want to invoke this update button by doing
    doSubmit('UPDATE');
    doSubmit(anyinput);
    I want to do update first, then leave update screen.
    The problem for me is that sometimes it works ok. Sometimes it just didn't do the update.
    If I only do
    doSubmit('UPDATE');
    it looks like work ok.
    If I do
    doSubmit('UPDATE');
    doSubmit('GOHOME');
    This causes problems
    Is there a way let update finish, then go home?
    Thank you.
    Edited by: user628655 on Nov 11, 2009 3:14 PM

    Hello:
    Create a branch with a branch point of 'On Submit After Processing...' . Set the Target for the branch to be URL and for the URL specify your 'Home URL'. Set the branch to execute for the 'Update' button.
    varad

  • Javascript function not working in IE but in Firefox

    Dear fellow developers and pros, I have a huge problem with the following function. While it works perfectly in Firefox, the Internet Explorer (my special friend) doesn't interpret the code correctly. At least this is my guess. The message box appears but the UPDATE process is not carried out and the application procedure "proc_delete_mx" is not carried out either. Only the redirect works!
    I need to get it to work in IE, as a lot of end users depend on the IE and are restricted to use alternative browsers.
    Can you please help me on this one!??? You're my last hope as I have already tried to paste this function into several template regions. In the past it used to work for jQuery code not interpreted by the IE.
    <script type="text/javascript">
      function warning1(){
        var lValue = $v('P231_CHECK_CE_STATUS');
        var pValue = $v('P231_INT_STATUS');
        if(lValue*1 > 0 && (pValue == 1 || pValue == 2 || pValue == 5 || pValue == 6 || pValue == 7 ) )
          $('#dialogwarning').dialog('open');
    else
          doSubmit('UPDATE');
          redirect('f?p=105:18:&APP_SESSION.::NO:');
    $(function(){
      $("#dialogwarning").dialog({
        autoOpen: false,
        bgiframe: true,
         modal: true,
            width: 400,
            minWidth: 400,
            resizable: true,
         buttons:
    {Speichern: function()
    var get = new htmldb_Get(null,$v('pFlowId'),'APPLICATION_PROCESS=proc_delete_mx',0);
    gReturn = get.get();
    get = null;
    doSubmit('UPDATE');
    $(this).dialog(redirect('f?p=105:18:&APP_SESSION.::NO:'));     
    Abbrechen: function(){
    $(this).dialog('close');
    </script>
    <div id="dialogwarning" title="Achtung!">
    <p>
    <span class="ui-icon ui-icon-alert" style="float:left; margin:0 10px 40px 0;"></span>Es liegen bereits gutachterliche Bewertungen für diesen LRT vor.
    Wenn der Status geändert wird, werden alle gutachterlichen Bewertungseinstellungen und Ergebnisse verworfen.</p>
    </div>A million thanks for your answers!
    Regards,
    Seb

    Okay, I eventually found the bug myself and was able to fix it.
    The Internet Explorer 8 simply doesn't like a doSubmit followed by a straight redirect!
    doSubmit('UPDATE');
               redirect("f?p=&APP_ID.:1:&SESSION.");How I solved it??
    I created two custom pl/sql update procedures, which I'm calling in javascript with doSubmit.
    doSubmit('UPDATE_CUSTOM1');Additionally I created two new branches directing to the desired pages and set them to be conditional.
    Now the branches are taken after the request of my update procedures has been issued.
    Furthermore, I have no more problems with binding page items on subsequent pages, since the branches are doing it.
    Hope it helps!
    Regards,
    Seb

  • Call page process within Javascript

    Hey guys! Just shortly after working out my conditional Javascript dialog function I stumbled upon another little problem that is as follows:
    I need to call a page process from the Javascript function "dialogwarning" when the save button of a jquery dialog is clicked.
    The Update action works already but the pl/sql process is not carried out.
    Actually it cannot be that difficult...
    Can you please give me a hint how to accomplish it? Until now I've only seen threads were javascipt was called in an pl/sql process - not vice versa.
    Here's my code for the dialog:
    $(function(){
      $("#dialogwarning").dialog({
        autoOpen: false,
        bgiframe: true,
         modal: true,
            width: 400,
            minWidth: 400,
            resizable: true,
         buttons:{
           Save: function(){
              doSubmit('UPDATE','APPLICATION_PROCESS=proc_reset_mx_results');
          Exit: function(){
             $(this).dialog('close');
    </script>Any help is appreciated!
    Regards,
    Sebastian

    Well Dirk, thanks for your feedback.
    Option number 2 does not work for me since the "UPDATE" raised by the javascript function saves something to a table a and is supposed to launch a process that deletes from another table b. The javascript function in turn is already conditional to be raised only when some criteria match and a delete action is neccessary.
    In short words, option 1 would cause the launch of the delete procedure whenever the update process is called.
    Thus, I just created an application process proc_reset_mx_results that is of type after page submission:
    begin
    Delete from tbl_matrix_intermediate_result
    where str_lrt_class = :p231_str_lrt
    and lng_gebiet      = :p231_str_gebiet
    and int_be          = :p231_bewertungseinheit
    and eval_type       in (7,8);
    end;My problem - it doesn't work as it should. The dialog opens, I click the save button and in turn the update action is carried out. However, nothing is deleted from table b i.e. tbl_matrix_intermediate_result!
    Regards,
    Sebastian
    Wow, thanks for all your interest!
    @ roel
    It's a custom pl/sql anonymous block that is supposed to be called using the button of that jquery dialog. The dialog itself is only raised when a condition is met.
    The background info:
    -A user enters data that is stored in table a
    -The user goes to an evaluation module where the input values are weigthed and evaluated in an extensive stored procedure.
    -The user has the option to override the automatically calculated result by entering custom results.
    -Both result sets (automatic and custom values) are saved in tbl_matrix_intermediate_results.
    Here it comes:
    Only if the user modifies the input data after the evulation has been performed, then the message-box should be displayed and if the user agrees, all previous results should be deleted.
    I believe a trigger is not the proper tool for my purpose.
    I hope you can understand my point and problem now?
    Edited by: skahlert on 01.03.2010 14:20

  • How to make the enter key act as a button?

    I have a CREATE and UPDATE button and I would like the user just to be able to press enter and perform the create or update as appropriate as if the button was pressed.
    Thanks in advance for your help.
    Greg

    Greg,
    Use the following so you don't loose the delete message:
    <script type="text/javascript">
    //<![CDATA[
       htmldb_delete_message='"DELETE_CONFIRM_MSG"';
       document.onkeypress = keyHandler;
       function keyHandler(e) {
          var keycode;
          var id = $v('PXX_ID');
          if(window.event){keycode = window.event.keyCode;
          }else if(e){keycode = e.which;
          }else{return true;}
          if (keycode == 13){
             if (id) {
                doSubmit('UPDATE');
             } else {
                doSubmit('INSERT');
             return false;
          }else{
             return true;
    //]]>
    </script>What is the name of your primary key item?
    Are you getting any JavaScript errors?
    Did anything happen?
    Regards,
    Dan
    http://danielmcghan.us
    http://sourceforge.net/projects/tapigen
    http://sourceforge.net/projects/plrecur

  • SQL Report with 1 updatable column - help urgent

    Hi,
    I have a SQL report. I am using collection to store value of selected record by link column.
    I have a updatable text item (NULL) in the column. I am able to store that value in the collection.
    Any clue?
    Code
    1. Creating a collection in parent page:
    apex_collection.create_or_truncate_collection
    (p_collection_name => 'ORDER');
    2. Query to populate item rows with option to key 'QTY' before pressing 'Add to Order' link.
    select
    itemcode,
    description,
    NULL AS qty,
    'Add to Order' add_to_order
    from itemtab
    3. Made 'QTY' to Text item -- to allow users to key value
    4. Created 'hidden & protected' items P1_ITEMCODE, P1_QTY
    5. Set values of itemcode, qty in add_to_order link
    6. Created a process to add values into collection:
    for x in (select * from itemtab where itemcode = :P1_ITEMCODE)
    loop
    apex_collection.add_member(p_collection_name => 'ORDER',
    p_c001 => x.ITEMCODE,
    p_c002 => x.DESCRIPTION,
    p_c003 => :P1_QTY
    end loop;
    7. Display value of itemcode, description, qty in report region
    select c001, c002, c003
    from apex_collections
    where collection_name = 'ORDER'
    Probem: The value of qty is not being stored in the collection and not appearing in the #7 report. itemcode and description values are fine.
    Thanks,
    Dip

    Dip,
    I'm guessing here as I can't see your application, I think your missing the page process to collect the data from your QTY field.
    I created a quick demo of what i think your trying to achieve on apex.oracle.com
    http://apex.oracle.com/pls/apex/f?p=19923:2
    I added this to the html expression on the report Field add to:
    <input type="button" onclick="doSubmit(#RANDOM_ID#)" value="Add To" />
    Then the page process to collect and set the page item:
    DECLARE
    l_qty number;
    BEGIN
    FOR i in 1..APEX_APPLICATION.G_F03.COUNT LOOP
    l_qty := nvl(APEX_APPLICATION.G_F03(i),0);
    IF l_qty > 0
    THEN
    :P2_QTY := l_qty;
    :P2_RANDOM_ID := :REQUEST;
    EXIT;
    END IF;
    END LOOP;
    END;
    Let me know if this helps
    Mark
    Don't forget to mark reply as helpful or correct as this may help others reading this thread in the future!
    Edited by: cptbutcher on Mar 25, 2010 10:40 PM

  • Just Upgraded to 3.1.2 - doSubmit is not defined.

    I just upgraded to the latest XE by running the download.
    I am getting this error on the browser when I try to login :
    Error: doSubmit is not defined
    Source File: http://127.0.0.1:8080/apex/f?p=4550:1:1915389911065507
    Line: 1
    Any suggestions?
    -SJ

    Hello,
    Did you follow all the post installation steps? (Updating the Javascript/CSS files etc?). If so, try clearing out your browser cache to make sure your browser is getting the latest files.
    Hope this helps,
    John.
    Blog: http://jes.blogs.shellprompt.net
    Work: http://www.apex-evangelists.com
    Author of Pro Application Express: http://tinyurl.com/3gu7cd
    REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone!

  • Checkbox onClick table updates

    Hello,
    Ok, I'm struggling here. I have a list. The first item is a checkbox, I can check/unckeck the box without any trouble. What I can NOT do is update the table based on when the box is unchecked. I've created a Tabular Form and want to update a column on the record being reported on this form based on weather the box is checked or unchecked.
    If the box is currently checked, based on the data in the table, and the user un-checks the box, I need to update the value in the table. Since Oracle only returns checked items, that won't work. I don't want to update the entire table every time a user unchecks record.
    I'm sure it has to do with the onClick procedure, I just can NOT seem to get this to work.
    What I need is: If the box was not originally checked but the user clicks the checkbox so that it is checked then update the record with this primary-key-value marking the yes-no column with a 'Y'. If the box was originally checked and the user unchecks the box, mark it with a 'N'.
    Please help.
    Thanks,
    Don.

    Don:
    Make these modifications.
    For the query ,modify the checkbox item's value to be a concatenated string of
    EMP_ID.<Team_Member_Status>.<team_member>
    select apex_item.checkbox(1,EMP_ID||'.'||decode(team_member,'1','Y.Y' ,'N.N')
    ,decode(team_member,'1','CHECKED' ,Null) || ' onClick=setVal(this)') "On Team",
    apex_item.text(2,Fullname)
    from employees;Add the Javascript below to your page
    <script>
    function setVal(cb) {
    // split the value of the chekbox
    vals=cb.value.split('.');
    //set third element of the chekbox value string to indicate users new selection
    if (cb.checked)
       vals[2]='Y'   
    else
       vals[2]='N';
    // put the value of checkbox together
    cb.value=vals[0] + '.' + vals[1] + '.' + vals[2]
    function setAll() {
    cbs=document.forms[0].f01;
    // set all checkboxes so that each can be refereced in the g_f01 array
    for (i=0;i<cbs.length;i++){
        cbs.checked=true;
    // submit the form
    doSubmit('SUBMIT')
    </script>
    Set the SUBMIT button of your page to re-direct to the URL
      javascript:setAll
    Now, your after submit process can access each checkbox (via the g-f01 array)
    and the value of the checkbox will be a concatenated string formatted as
    <emp_id>.<original value of team member>.<new value of team member>
    You can now split the concatenated string into its components. Comparing the old and new settings of the 'team member' components will let you decide whether the record corresponding to the 'empid' needs to be updated or not.
    Hope this works for you.
    Varad                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Javascript:doSubmit action

    Hi all,
    1. I've created an updatable report with buttons in each row.
    2. A click on the button would create a form in the adjoining cell using JS.
    3. When I click on "Save" in that form a table is updated with the comment entered.
    4. At this point I want the page to refresh too. I've tried by using the
    doSubmit('REFRESH_PAGE233');
    and created -
    a. a conditional dummy process which will run if Request = REFRESH_PAGE233
    b. a conditional branch in the page which will redirect to the same page acheiving the page refresh when Request = REFRESH_PAGE233.
    However this does not seem to work for me. Ant suggestions ?
    The application is http://apex.oracle.com/pls/otn/f?p=17276:19
    Thanks,
    - Yogesh

    Looks like someone is testing this app.
    I set the status to 'N' and comments back to null
    so that all the rows appear back in the first report.
    - Yogesh

  • Tecra M9-136 - BSOD during Vista SP2 update

    Tecra M9-136 asked this morning to update to Vista SP2 and during the process the BSOD 0x0000007E arrived. Restarted in Safe Mode and the installer continued and then finally reported that the update had failed - and reverted to SP1. This took most of the morning.
    It will start in Safe Mode but on a normal boot-up, Vista SP1 gets through the fingerprint recognition and then fails with the same BSOD (it doesn't get as far as displaying the desktop).
    The laptop has BIOS level 1.80. I've tried in Safe mode to install 1.90 but it tells me that the battery has insufficient charge and the power adapter isn't attached. Both untrue.
    Stuck - need advice. Could this be a hard fault? Can't see how I can update anything if it's a soft fault.
    thanks

    The message with the BSOD mentioned checking BIOS and driver versions. Anyway, no change made to that.,
    I tried System Restore but the only available restore point was the SP2 installation. I thought Vista was supposed to save a restore point every 24 hours even if nothing new had been installed.
    I've now found in System Information / Windows Error Reporting several messages like this:
    28/09/2009 12:08 Windows Error Reporting Fault bucket 0x7E_NULL_IP_DRVNDDM+57bd, type 0&#x000d;&#x000a;Event Name: BlueScreen&#x000d;&#x000a;Response: None&#x000d;&#x000a;Cab Id: 0&#x000d;&#x000a;&#x000d;&#x000a;Problem signature:&#x000d;&#x000a;P1: &#x000d;&#x000a;P2: &#x000d;&#x000a;P3: &#x000d;&#x000a;P4: &#x000d;&#x000a;P5: &#x000d;&#x000a;P6: &#x000d;&#x000a;P7: &#x000d;&#x000a;P8: &#x000d;&#x000a;P9: &#x000d;&#x000a;P10: &#x000d;&#x000a;&#x000d;&#x000a;Attached files:&#x000d;&#x000a;C:\Windows\Minidump\Mini0928 09-04.dmp&#x000d;&#x000a;C:\Users\me\AppData\Local\Te mp\WER-75660-0.sysdata.xml&#x000d;&#x000a;C:\Users\me\AppData\L ocal\Temp\WER7D78.tmp.version.txt&#x000d;&#x000a;& #x000d;&#x000a;These files may be available here:&#x000d;&#x000a;C:\Users\me\AppData\Local\Mic rosoft\Windows\WER\ReportArchive\Report06d1c4b5

  • Cannot open and update IPhoto after upgrading to OXYosemite

    From the App store, I downloaded and installed OXYosemite. There are 2 more updates available: iPhoto and iMovie. When I try to upload them, the notice I get is "Update Unavailable with This Apple ID  This update is not available for this Apple ID either because it was bought by a different user or the item was refunded or cancelled."
    I have 2 apple IDs when I inquire about my ids. Signing in App Store with either of them, doesn't resolve the problem. I get the same notice. iTunes, Mac, mobile downloads, all use the same apple IP, only for the computer downloads from App Store isn't working.
    What should I do?
    Thanks, Sev

    I have the same problem and can't find out how to correct it.  Unable to update iPhoto or iMovie .. I get the same message as above user.  Help!

  • Error message: "playlists selected for updating no longer exist"

    I tried to update my ipod nano and I guess I had deleted a playlist, but since then, I have not been able to update. Every time I try, I get the following message:
    "Cannot be updated because all of the playlists selected for updating no longer exist."
    I haven't been able to highlight which playlists are selected to begin with.
    I read through the manual and thought that maybe rebooting the whole system might work. So I deleted Itunes from my computer and re-installed.
    Then I tried re-setting my ipod. So now I have nothing on my ipod.
    I also deleted everything from my library, thinking it might help to start from scratch. Nothing has worked.
    How do I "select" and "unselect" playlists so I can get up and running again?

    Here you go.
    http://discussions.apple.com/thread.jspa?messageID=607312&#607312

  • Error message iPod cannot update b/c all of the playlists no longer exist

    Hello. I have been getting this error message. "Songs on the iPod "MAR(the name of my iPod)" cannot update because all of the playlists selecting for updating no longer exist." And my playlists are still on the left side in my iTunes. They do exist. I have a feeling ths might have to do with the fact that on vacation the person I was visiting gave me a gift of putting all of his music that would fit into the external hard drive part of my iPod, and for the past week or so I have been putting that music onto my 40 GB portable hard drive at home. I suspect I took a vital folder out of my iPod by accident. Right now I have the folder iPod_control if I open my iPod up in My Computer. Am I missing something? Right now my iPod is empty because iTunes made a composite playlist last week and I deleted it thinking I could get my real playlists back. Can you help me, or reccomend a site/someone who can? Thank you.
    PC   Windows XP  

    hiya!
    And my playlists are still on the left side in my iTunes. They do exist.
    let's just doublecheck this. folks get this message if they have "automatically update selected playlists only" selected in their itunes "ipod" preferences tab. so bring up that tab ("edit > preferences", click "ipod" while the ipod is showing up in the source list), and do a playlist by playlist crosscheck of the playlists selected in that tab, and the playlists showing up in the itunes sourcelist.
    is there any playlist selected in the preferences tab that isn't showing up in the sourcelist?
    love, b

  • Video IPOD no longer recognized by Itunes and wont Update

    This is a long complicated issue. My Ipod has been working flawlessly until 2 weeks ago. Someone tried to plug it up to their computer to charge it and it wiped out my library and added their library. At first i was thinking no big deal, i will just reconnect it with my computer and it will load my library back on. However once connected to my computer it is not recognized by itunes. So i did a reset , which seemed to be working great and it started "updating" about 80% through that process it gave me an error message that says " This disc can not be written to or written from" now I have no idea why it would say that? and although it seems completely wiped out and useless, it still shows that much memeory is missing in the "about ipod" screen on the ipod. So i know the information is there somewhere , somehow?... Anyway I dont know what to do, Does anybody have any suggestions?
    Oh and I have also uninstalled and reinstalled the Itunes program to make sure it is up to date. WOuld adding new songs to my library have caused this problem?

    1. Try Resetting the iPod. Hold Select and Menu for 6-10 seconds - until you see the Apple Symbol.
    2. Use iPod Updater to restore your iPod to factory settings.
    See if those two steps clear up your problem.

  • Error during OS 4.2 update; Ipod no longer recognized by windows or itunes;

    I've had my 3G 8gb since last Feb and never updated the OS (3.1.3). Yesterday I tried updating to 4.2. (OS: Windows Vista 64bit Home Premium; iTunes: 10.1.1.4) There was an error (unfortunately did not make a note of). Now my ipod touch is stuck in "Recovery Mode" and cannot be seen by Windows or iTunes. Windows does detect new hardware but when I browse for the drivers, I get the error "Could not find driver software" after I pointed exactly where it was located in C:\Program Files\Common Files\Apple\Mobile Device Support and C:\Program Files\Common Files\Apple\Mobile Device Support\Drivers. I've tried removing all Apple software from my computer and then reinstalling iTunes but I get the same results. I don't know what else to try. Any ideas? Thanks!

    I found a solution last night through http://support.apple.com/kb/ts1538. But thank you for trying. The worst part was that I was doing the right thing all along but I think there is a bug in Vista (or I don't understand why I couldn't do it the way I was). On the window that appears after I clicked "Browse my computer for driver software", there are 2 options. The first says "Browse for driver software on your computer" which has an edit box under it and a "Browse" button next to the edit box which allows you to pick the parent directory that driver is in. The second option says "Let me pick from a list of device drivers on my computer". I knew where the drivers were so I was doing option one and it would not work (many repeated attempts after re-installing iTunes, etc.) - VERY FRUSTRATING. But now I'm up and running!!!

Maybe you are looking for