APEX submit changes to the database when the value is changed in Javascript?

Hello

IM new at the Apex and use v4.1.

What I want to do, is to have a tabular presentation that will have 5 fields and a number of fields only reading based on a SQL table & reviews, when a user updates one of the 5 fields entry I want to save the change to the databases automatically.

I thought that this could be done using Ajax and Javascript, but my knowledge is not at a high enough level to make it work.

I think what I need to do:

1 create an AJAX callback process (say its called "Submit Changes") - it comes to PL SQL that will update the database based on the value of the field that was changed. I think that this will require the number of line in table form to pass in.

2. create a header HTML with Javascript code that calls the recall AJAX process - I found the below on the net, but do not think that I changed it correctly:
< script type = "text/javascript" >
function Submit_Value() {}
var ajaxRequest = new htmldb_Get (null, & APP_ID., 'APPLICATION_PROCESS is Submit Changes', 0);
var ajaxResult = ajaxRequest.get ();
Alert (ajaxResult);
}
< /script >

3. change the attributes of elements ' "on the column compared to something like onchange ="Submit_Value () ";

So far I have not been able to get this working and would be grateful for any help or suggestion.

Thank you

Goes

just a quick thought: I myself remember in 3.x days by using a process with a space name did not work (at least when I was trying to use), I have always since then named such with underscores in the... IE: submit_changes the two (the name of the process in the apex) and the reference of the code in javascript

Tags: Database

Similar Questions

  • change the values of 'choiseListe' with javascript

    Dear Sir

    Is it possible to change the values of 'choiseListe' with javascript.

    Example they have a choseListe:

    Country / / / values

    United States us

    France fr

    Sp Spain

    When he clicks in a botton I whant to change this choceListe:

    Country / / / values

    My Morocco

    PT Portugal

    ............

    Thank you

    Hello

    Drop-down lists and drop-down menus can be scripted against without much to safely.

    You would need something like that in the click event of the button:

    listbox1.rawValue = null; //clear previous choice
    listbox1.clearItems(); //clear the list items
    listbox1.addItem("Moocco", "ma"); //add new list items
    listbox1.additem("Portugal", "pt");
    

    Hope that helps,

    Niall

  • Submit after selecting the value of Popup LOV

    Anyone know if it is possible to make the Popup LOV behave as the list select and resubmit the page after selecting a value?

    The Select list has an additional attribute in properties named "Page Action times changed value". One of the options for this attribute is "submit Page". This attribute is not available for Popup LOV, but I would like to be able to create the same behavior. The number of values that might be returned for this article is too many to use a Select list...

    I think I might be able to add a bit of Javascript somewhere and do a "onChange.submit ()" or something like that, but I'm not sure of the syntax, or where to put it.

    Any help gratefully received...

    TIA,
    Eric

    Hello Eric,

    Create a "dynamic Action" that fires when the value of Popup LOV is changed and set the Action to "submit Page".

    Thank you
    Machaan

  • Submit button in the value of the argument cftextarea

    Hello ~

    I have a cftextarea argument whose value is populated from a database. The problem is that some of the values contain a form code, including the buttons send. Most of the form is displayed correctly within the cftextarea richtext argument, but the Send button is always displayed outside the text, rather than as part of the value of the textbox. I have html set to Yes, and I'm using the richtext option. Any ideas? Thank you!

    Esacpabe HTML code with htmlCodeFormat() or htmlEditFormat().  An ads one set of.

    labels, but I can never keep them all right without looking at the documentation.

    Otherwise the browser will see the HTML tags and analyzed so that they find them.  Browsers aren't strict on closing before the other opening tags tags so that you can not put the tag code unescaped within something like another block of HTML tag.

  • Getting the value of Session with javascript

    Hello

    I was wondering is it possible to get the: value of the SESSION with javascript with Apex 3.2? Or is it still the case that we do an Ajax call to get this value?

    Here is my code, and as you can see I am using the $v function but his return nothing.
    <script>
    function showMultiValButton(pVal, pThis){
         var selectVal = $x(pVal).value;
         var multiValues = new Array ("6","8","9","10","11");
         var apexSession = $v("SESSION");
         
         if (jQuery.inArray(selectVal, multiValues) != -1) {
              $(function(){
                   vHelp = '<div id="multiBox" title="iCreate Get Multi Values"><iframe src="http://hts03:7778/pls/htmldb/f?p=180:214:'+apexSession+':::::" width="650" height="450" title="iCreate Get Multi Values"></iframe></div>'
                   $(pThis).append(vHelp);
                   $("#multiBox").dialog({             
                 show: 'scale',
                 stack: true,
                 modal: true,
                 height: 500,
                 width: 685
              });
         });} else {
              $(function(){
                   $("#MULTI_VAL_BUTTON").hide();
              });
         }
    }
    </script>
    See you soon,.
    Paul.

    Hello Paul,

    Replace $v("SESSION") by $v ('pInstance')

    Greetings,
    Roel

    http://roelhartman.blogspot.com/

  • Apex. Submit - the value of the claim

    By using a number of different versions of Apex - on this particular server is Apex v4.0.2

    The JavaScript API documentation indicates apex.submit () the definition of the QUERY variable - which I suppose is the point value of standard application used in the Apex.

    I'm currently debugging presentation on the side of the browser and apex.submit () to DISPLAY the value of the request (as a variable p_request). But the value is not accepted or implemented on the side server. With the help of : REQUEST or v('REQUEST) in the regions of the page does not display the value of the validated request. It has the value null. There is no explicit condition of branch on the page.

    Which do not work, is that the elements of page values assigned are submitted and seen by the back-end. For example if P1_NAME is defined in apex.submit (), this value is visible by regions/process page after submission. Unlike the value of demand.

    I'm doing something wrong? Is this a problem with an older version of the Apex?

    BillyVerreynne wrote:

    It works very well. All elements of page Apex that are assigned values, performed with the values and the process/regions/etc on the next page has the correct values.

    The value of the REQUEST is disabled before the exposure treatment page unless it is set in a branch or a URL, this is why he has no value when they are referenced in the next page.

    Set the attribute to query in a branch of post-submit to the target page of &REQUEST. to demand ongoing value available in the page to see the transformation.

  • By passing the value in column IR to package Oracle

    All,
    I try to call a package Oracle of APEX and must pass the value of a column of IR in this packaging. I tried saying: ADJ_ID but I don't think his pasing anything for the backend.
    Here are the steps.
    1. the user runs IR
    2. There is a column that I put as "ROLLBACK" on this report for each line that has a LINK that calls URLS like
    JavaScript:apex.confirm (' safe to restore adaptation? "," SEND");
    3. once the user confirms submit, I call the package, package gets called but I want to send a value for that line to the package, I do this by saying: (colon) rating but it does not work.

    Thank you
    Vishal

    You must set you page item (as you try to pass by using the method of colon in PLSQL) first

    You can change your link to

    * JavaScript:apex.confirm ("Sure to restore adaptation?", {request: 'SUBMIT', value: {"P1_ROW_VALUE": 10}}); *

    P1_ROW_VALUE is the Page element that you want to set and 10 here is specific to the LINE value

    If you use the "links" section in the report attributes
    and then, something like that would

    * JavaScript:apex.confirm ('Safe to restore the fit?', {request: "SUBMIT", value: {'P1_ROW_VALUE': ' #COLUMN_ALIAS #'}}); *

    Alias_de_colonne is the name of the column you want to set the element with the value.

    Published by: 814948 on November 23, 2010 08:46

  • Search and replace values in the text field before the values are stored in DB

    Hello
    There is a question - answer and text box text field - in my application. Problem is, some of the answers are stored with the apostrophes to the DB and I have a problem while recovering in the DB. I need to replace the single quotes 1 with 2 apostrophes. The values are stored in the DB when you click on the submit button.

    So, I'm using the following javascript code:
    italics
    < script type = "text/javascript" >
    function test().
    {
    var str = "& P2_S1.";
    document. Write (Escape (STR));
    }
    < /script >
    italics
    I need to call this javascript function, when the user clicks on the button submit, but BEFORE the values are stored in the DB. How can I get this done?

    Please let me know.

    Hi Suzi,

    Just use

    begin
    update test set S1=replace(:P2_S1, '''', '''''') where name=:APP_USER;
    end;
    

    as you did in your SELECT statement.

    But I shake also why you want to do? Where do you have problems with the apostrophe?

    Concerning
    Patrick
    -----------
    My Blog: http://www.inside-oracle-apex.com
    APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins

  • How to get the value of a * Global * Application point of JS

    If we declare an element of the request, which is NOT a level of the page in question, how we get the value of this element in an Action dynamic JavaScript on a page?

    For example, we declare a "global" variable as an Application named DEFAULT_AJAX_SEPERATOR and set its value with a calculation of the claim "on the new Instance" a moment later, on a page of the application, we would like to get the value of DEFAULT_AJAX_SEPERATOR via JavaScript.

    Page* level syntax element...
    $v( 'DEFAULT_AJAX_SEPERATOR' );
    .. How does not work. I don't understand why it's like $v can only access the elements on the page. However, the APEX is clearly able to get these global values since, for example, they are available in PL/SQL blocks. Also, I know that it is on the session object, because I can see it when viewing the session.

    So... What is sauce secret for obtaining this value?

    Thank you

    -Joe

    Hello
    Use something like this in your javascript code.

    var appItemVal = "& DEFAULT_AJAX_SEPERATOR.";

    Thank you
    Naidu789.

    If you think, I responded to your question, please mark as answer.

  • The values of different session during the passage of &amp; APP_SESSION. as a parameter

    Hi all

    I use APEX 3.1.1 and have the following problem: I have a JS function in my application, which generates a URL by using the provided parameters. His signature might look like:

    function xxx (p_param_item, p_session, p_app_process, p_app_id)

    Yes, I use this to call for a process on demand application (AJAX magic ;)

    The problem is that when I call a page using item & APP_SESSION. for the 3rd parameter, it seems that for some reason JS receives a different value (I checked myself put an alert and displays the value of the parameter and the & APP_SESSION. string substitution).

    I know will say you: + "then why don't you use & APP_SESSION.» Instead? "+ but the thing is, my JS code in a separate file, and for some reason, APEX does not replace this string on this separate file.

    Then... of suggestions? Ideas? New approaches?
    Thank you all in advance for your help.
    Kind regards

    A & iacute; Prom

    Hello

    In an external file, you can use-

    $x('pInstance').value
    

    or

    $v('pInstance')
    

    (depending on your version of APEX)

    to reference the value of the current session.

    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
    AWARDS: Don't forget to mark correct or useful posts on the forum, not only for my answers, but for everyone!

  • Passing the value of the element of a page to the other

    I have the following requirements.

    Page 1: Register Username (form)
    -Insert the user name in A Table
    -Redirect to the new page
    Page 2: Collect modules (form)
    -Insert the info collected in table B
    -User name of Page 1 is the primary key

    My problem:
    I can't understand how to use the value of the username (Item1) from Page 1 to Page 2.

    What I tried:
    (A) Item2 created in Page 2
    -After that treatment direction Page 1 value with the value of Item1 Item2
    -no value not transferred (failure)
    (B) source edited Item2 on Page 2 for:
    -Used: Always, replacing an existing value in session state
    -Type: point
    -Session State: per session
    -Value of source: P1_ITEM1
    & Several combinations of the two

    My question:
    Passing a value of item from a page to another seems to be a relatively basic operation.
    Am I trying to do something that APEX isn't designed to handle?
    Is there a practical way more traditional or better to deal with these issues?

    Any comments I can get would be great

    Thank you
    Dan

    Published by: 903485 on December 20, 2011 06:26

    If the value of the item has been saved in session state (it is generally except if you explicitly Apex to not save the value in session state), then you can reference any element in your application to any other page or another process. So in other words you have a process on page 2 that runs before your page content (FRONT header, AFTER the header or BEFORE REGIONS) that does something like this:

    :P2_ITEM := :P1_ITEM;
    

    If you do that, then should have recorded the value on your other section of the page. This can also be done with calculations. It can also be done with the attribute of the SOURCE of your page, article, and there is probably some other ways to do it as well. One of these should be able to meet your need. Good luck.

    Earl

  • How to get the value of the option button in JavaScript

    I have a very simple radio with two values: 1 and 2. I'm moving the value by using a JavaScript call to a pop-up window. I guess there is another method of getting the value, as
    var v_typ = document.getElementById("P1520_TYPE").value;
    does not work.

    Hello

    If you are on Apex 3.x or later, use the JavaScript $v API functions
    http://download.Oracle.com/docs/CD/E14373_01/apirefs.32/e13369/javascript_api.htm#CHDEJEIG

    var v_typ = $v("P1520_TYPE");
    

    Kind regards
    Jari

  • It is possible to change the apex.submit () method?

    Hello everyone,

    It seems that the apex.submit () method always executes a HTTP-POST method. Something like this:


    POST /pls/htmldb_devdb11/wwv_flow.accept HTTP/1.1
    Content-Length: 180
    p_flow_id = 136 & p_flow_step_id = 17 & p_instance = 962043850817501 & p_page_submission_id = 1613388309541601 & p_request = T_ORDERS & p_md5_checksum = & p_page_checksum = 82507D5724D222E8E9BCB19A79C6D62F

    I wish I could change this to a GET, it's something like this:

    GET /pls/htmldb_devdb11/wwv_flow.accept?p_flow_id=136 & p_flow_step_id = 17 & p_instance = 962043850817501 & p_page_submission_id = 1613388309541601 & p_request = T_ORDERS & p_md5_checksum =, & p_page_checksum = 82507D5724D222E8E9BCB19A79C6D62F HTTP/1.1


    Thanks in advance,

    Luis

    Hello Luis,.

    There is a solution that you could use. Edit each template of your website and add the following JavaScript just before the end body tag:

    You can't influence (as I know) how APEX produces chains of substitution #FORM_OPEN # and #FORM_CLOSE #.

    Greetings...

  • What to do for the main database when a physical database ensures converts a standby time of the snapshot

    Hello

    Need of the primary database to implement the flashback database when a physical database ensures converts a standby time of the snapshot? Or something to do with the primary database? I find some documents this work to allow the return of flame for the primary databases, but I think that he didn't need to do.

    Thank you

    Best regards.

    I did recently, I have not configured flashback on primary, only configured in the standby mode. I converted the standby database and restored the changes after the test. Primary database continued to send archives to the standby site. Instant once converted into sleep mode, as mseberg mentioned overlaps with the sync state after starting MRP.

  • change should only be updated only when the value of lov

    Hi experts Adf.

    JDeveloper 11.1.1.4.0

    I have a usecase where a lov and a field date is in a table. Each time, I have a lov selects for the first time, and then save the button. Then change date is get inserted with null. (it's fine).

    Now when I change the existing value of the lov and then clicking on save, then the modified date is updated. (it is also very good).

    Scenario question: suppose that in the first row, WE show dropdown because it is saved in the database and change date as null.

    However when I try to change the value to lov ' sales and do not click Save. Now, once I select IT and clicking record. In this case, change date is updated.

    Idle screenplay: Change Date must be updated if there is no modification.

    Untitled.jpg

    If (operation == DML_UPDATE) {}

    setModifyDate (newTimestamp (System.currentMillis));

    }

    You can check the value of publication and skip this step if postedValue is newValue.

    See this example: http://adfcodebits.blogspot.com/2010/07/bit-22-using-getpostedattribute-to.html

    Dario

Maybe you are looking for

  • Toshiba L 40, 7335 does not start

    I have a Toshiba smart l7335, that it does not start. At the beginning the indication led starts green and at the end of 2-5 seconds looking past automatically mode and indicator led turns red. The screen seems to be turned on but no signal at all or

  • How to find a RAW Photo folder

    I shoot in RAW and JPEG and used to transfer both iPhoto and now Photo. As I learned more I realize it was stupid, then I want now to extract my RAW files and put them on a separate drive so that they are available to change 'serious' as needed and j

  • Where to buy a Qosmio G50 - 10 h

    Hello I want to buy a Qosmio G50 - 10 h. However none of the g50 range appear to be available on the toshiba site.. .nor nowhere elsewhere Does anyone know why it is not available and when it would be? Thank you

  • No update. Código 8007064 has

    Remember - this is a public forum so never post private information such as numbers of mail or telephone! Ideas:No puedeactualizar una important change You have problems with programs Error messages Recent changes to your computer What you have alrea

  • I CAN'T REBOOT MY COMPUTER (WINDOWS XP). CAN YOU HELP ME, PLEASE? Thank you

    WHENEVER I TRY TO RESTART, NOTHING IS GETTING PAST. Thank you