Javascript apex.submit

Hi,
I am using the Javascript (javascript:apex.submit('TEST')) on the report attributes item (PID). I need to pass the PID value. Can i pass the value of the item in the Javascript
apex.submit.
Please suggest how we can pass the value.
Thanks,
Vikas

Vikas,
In APEX 4.0, we added a new signature for the apex.submit function that does allow setting an item's value. For example, in the column link 'URL' for your PID column, you could specify the following:
javascript:apex.submit({request:'TEST',set:{'P1_HIDDEN_PID':'#PID#'}});This assumes you have a page item called 'P1_HIDDEN_PID' that stores the specific row's PID value.
We actually use this technique on the 'Report Attributes' page itself, when clicking a column link to edit a column (to save any changes made to the current page and still branch to the appropriate column edit page). Official documentation on this function can be found in our API reference guide here:
http://download.oracle.com/docs/cd/E17556_01/doc/apirefs.40/e15519/javascript_api.htm#CHDBEACA
Hope this helps.
Anthony.

Similar Messages

  • Can I have a conditional javascript:apex.confirm when column is null

    Hi All,
    I am relatively new to the product but am picking up things all the time. I was recently asked to create a confirmation on submit dialog which I did quite easily using javascript:apex.confirm. I was then asked to only display the confirmation message if a comment column was empty. The column is optional but it is preferred if something is added. I am using 4.1.1. Is this possible? Any ideas would be appreciated
    Regards
    Chris

    Hello Chris,
    >
    user4023958 wrote:
    I am relatively new to the product but am picking up things all the time. I was recently asked to create a confirmation on submit dialog which I did quite easily using javascript:apex.confirm. I was then asked to only display the confirmation message if a comment column was empty. The column is optional but it is preferred if something is added. I am using 4.1.1. Is this possible? Any ideas would be appreciated.
    >
    How have you implemented the apex.confirm?
    <ul>
    <li>If you have done it in dynamic action on button click then you have to make the dynamic action conditional by using Item/Column value is not null condition with expression as your comment item say P1_COMMENTS</li>
    <li>If you have done it in Button Action as Redirect to URL then simply you can write a javascript function in your page header as :
    <script type="text/javascript">
    function f_showConfirm () {
      if ($x('P1_COMMENTS').value == '') {
        apex.confirm('Do you want to submit this page?', 'SUBMIT');
      } else {
        apex.submit('SUBMIT');
    </script>and call this javascript function in Button Action - Redirect to URL with URL Target set as:
    javascript:f_showConfirm();</li>
    </ul>
    In order to get accurate/appropriate response you should include relevant details from following information with your question:
    <ul>
    <li>Full APEX version</li>
    <li>Full Database version</li>
    <li>APEX Web server architecture (EPG, OHS or APEX listener)</li>
    <li>Browser(s) and version(s) used</li>
    <li>Operating system with version, architecture(32/64)</li>
    <li>Theme</li>
    <li>Template(s)</li>
    <li>Region/item type(s)</li>
    </ul>
    The above information will help the forum members to ascertain the problem context and post most relevant response.
    Please read the [url https://wikis.oracle.com/display/Forums/Forums+FAQ]FAQ and [url https://forums.oracle.com/forums/ann.jspa?annID=1324]forum instructions for more information on using OTN forums effectively.
    Please update your forum profile with a real handle instead of user4023958.
    Hope it helps!
    Regards,
    Kiran

  • Javascript form.submit() fails when imbeded in table

    Before updating this worked fine, but now version 3.6.12 is failing to respond to javascript form.submit() inside a html select option control!
    Operating system is Windows 7
    The problem seems to be, because the form is imbeded inside a table.
    Internet Explorer is still working ok, so looks like Firefox is now going to take second fiddle until / unless this is solved!
    Yes, I know the easy way would be to remove the table! But then I have to use some other way of displaying data on the page!

    Yeah, but it worked fine untill the last update!
    I also have trouble with other javascript things, for example fckeditor no longer works in firefox.
    I have been avoiding Internet explorer, but now it looks like I will be forced to use it, because it is still working with the things that I use on a regular basis...

  • Apex.submit issue when using jQuery Overlay

    Dear All,
    This is my first post in this forum and I hope I can find a solution for my issue.
    Currently we are developing a new Time Attendance System by Apex.
    I am facing a problem when I use the jQuery Overlay in one of the pages.
    the page it self is working fine and all it button and tabs are also working fine until I click the link for the overlay content
    the content is another page getting loaded in a similer to a popup window (overlay effect) after I close this overlay window
    all the links in the original page that are using the apex.submit are not working and show an error in the browser "Object doesn't support this method or property"
    This only occur when I click the overlay link but if I load the page and I don't open the overlay link all links are working fine.
    And Thank you all inadvance.
    Regards

    It's always easier to debug an issue like this by recreating the problem on apex.oracle.com and providing credentials.
    How did you set up the overlay content? Did you create any additional HTML elements within one of the apex regions? If was just adding some DIV content then try moving that DIV content to after the #FORM_CLOSE# substitution string in the page template.

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

    Hello everybody,
    It seems that apex.submit() method always performs 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 would like to be able to change this for a GET, this is 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

    Luis wrote:
    Hello everybody,
    It seems that apex.submit() method always performs 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 would like to be able to change this for a GET, this is 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,
    LuisBut why do you want to modify the standard apex.submit() api? you should not be modifying that anyway. It is only doing standard submit() method
    Instead you can use jQuery get() method like this
    $.get('wwv_flow.show',
           {"p_request"      : 'APPLICATION_PROCESS=YOUR_ON_DEMAND_APPLICATION_PROCESS',
            "p_flow_id"      : $v('pFlowId'),
            "p_flow_step_id" : $v('pFlowStepId'),
            "p_instance"     : $v('pInstance'),
            "x01"              : 'test'
            function(data){
             alert(data);
           );

  • How do I redirect to a URL with JavaScript on submit in Adobe LiveCycle

    How do I redirect to a specific URL with JavaScript upon submit in Adobe LiveCycle?
    I already have the code in place where the submit event is handled, and just need the specific code to do the redirect.
    Standard asp.net-style redirects such as
    windows.location.replace(http://myURL.com);
    do not work.
    Any help would be appreciated.

    To be able to redirect a website with a submit button, you must have a custom submit button and insert the following line:
    app.launchURL("www.url.com");

  • Simple javascript APEX question

    Hello,
    I am new to oracle APEX and am trying to complete an application but have one small issue. I am using a barcode gun to check in servers and other hardware, and once it is scanned it sends an "enter" to add the next row in my Master-Detail form. The code i am using for this is : onkeydown="javascript:if(event.keyCode==13){event.keyCode=9;return event.keyCode}" This works fine, it takes my enter from the barcode and tabs it to the next line. However at a different part of the form I need to make it convert my enter to a tab, and then back to an enter. Essentially I need it so that I scan the barcode, it then submits an enter, which is converted to a tab, and then I want it to then use an enter key. I cannot get this to work. My java skills are lacking, and this is what I have come up with:
    onkeydown="javascript:if(event.keyCode==13){event.keyCode=9;return event.keyCode;event.keyCode=13;return event.keyCode}" This is just not working, any ideas on what I can do?
    Thanks
    Aaron

    let me clarify, I have a master detail app. basically, the master holds all the racks for a datacenter, and the details page holds all the hardware within each rack. this means i can click on rack A1, and then see all hardware within that rack. when I am creating a master record, i need it so that I can just scan the rack barcode and move on to the next one. The problem is, after typing in a rack name (not even with scanner) and pressing enter, it auto cancels my rack entry. I have tried changing text field to submit on enter, and even tried java to the dosumbit('Apply_changes_add') with no luck. The easiest way for me to implement this is to have it so that on this form element (rack_name), when you press enter, it converts to a tab (which moves the cursor to the (create rack button) and then presses enter (to submit this page). I agree that this may not be the best way of fixing this issue, but I have no other way of going about it. any suggestions?

  • Adobe Acrobat X Pro - Javascript for submit button

    Hi,
    I am new to Adobe Acrobat X Pro and I have just designed a fillable form and enabled user rights for reader, for them to send the form back as a PDF. I created the form with a submit button and have mailto:[email protected] but I want to know if it is possible to create a button that will run a javascript to bring up a persons Mircosoft Outlook contacts, so they can choose who they want to send the completed form too.
    Any help would be greatly appreciated.
    Thanks.

    See post #7 and #10 in the following topic: http://forums.adobe.com/thread/793083?tstart=0

  • Problem using javascript to submit jsf form, values not submitted

    Greetings!
    I have a t:selectOneMenu where I want the page to be submitted when they change the selected value. At this point, I am able to get the form to submit and reload the page, which is all fine. The problem is that none of the values from the page are not set in the backing bean. I have break points on the setter methods that are not being hit.
    I have tried a number of things from searching multiple forums, but here are snippets from my latest version...
    <h:form>
    <t:commandLink id="hiddenLink" forceId="true" value="test link"
    action="#{pc_PageX.doBtnHiddenLinkAction}"></t:commandLink>
    <t:selectOneMenu id="pageList_top" forceId="true" value="#{pc_PageX.ValueX}"
         onchange="jspellSync(); submitPageX();">
         <f:selectItems value="#{pc_PageX.ListX}" />
    </t:selectOneMenu>
    </h:form>
    function submitPageX(){
         var hiddenLink = document.getElementById("hiddenLink");
         hiddenLink.click();
    }Note that the <t:commandLink> is not hidden, though it will be in the final version if I can get this to work.
    If I click the commandLink myself, the page is submitted with all the page values as expected. If I change the list value, thus using javascript to fire the commandLink's click event, the page is submitted with NO values.
    Can anyone come up with an explanation for this behavior? Or better yet, a solution?
    A couple other things I've tried...
    - Not using a commandLink and using jsf's submit function -> onchange="jspellSync(); submit();"
    - Clicking the link using other ways -> hiddenLink.fireEvent('onclick');
    If all else fails, I'll just add a button that they have to click to submit the form.

    snotmare wrote:
    BalusC wrote:
    I recall this problem in one of the ancient JSF versions. Which JSF version do you use? Do you have any room to upgrade to latest? We're using an IBM implementation of JSF, which is at version 7.0. The IBM implementation appears to be built on the JSF base 1.1.That's not an IBM JSF implementation, they do not have any one, they just have some component libraries which runs on top of some JSF implementation. RAD/WSAD ships by default with Sun JSF RI. Try upgrading to at least 1.1_02 which you can download from the aforementioned link. There's a gap of 2 years (and inherently a lot of bugfixes) compared to 1.1. If the application server used supports Servlet 2.5, you could even upgrade to the latest 1.2.
    We've had other issues with the IBM implementation, which could be the cause in this case too. We've been talking about switching to MyFaces, but there is one feature of the IBM version that we like. It's basically a script collector (hx:scriptCollector) that allows us to do pre-processing on the page.As said before, IBM does not have a JSF implementation. So replacing RI by MyFaces wouldn't make any difference.

  • Using JavaScript to submit a form with multiple submit buttons

    I am a newbie to JavaScript, so hopefully someone can answer
    this for me.
    On my user registration form, I have two buttons that submit
    the form, 'check_availability' (to check if the username is
    available) and 'register'. In my PHP script, I check which button
    was pushed by checking which POST value is set,
    $_POST['check_availability'] or $_POST['register'].
    If I set the 'register' button to a JavaScript function that
    validates the form and then submits it, how do I get my PHP script
    to think 'register' was pushed?

    Sorry I used my old captcha script there.
    [php]
    <?
    session_start();
    if(isset($_POST['button_name'])){
    //DO SOMETHING HERE
    } else {
    //Add the page data
    ?>
    [/php]
    "east99" <[email protected]> wrote in
    message
    news:fepqr8$2mr$[email protected]..
    > Firstly name your buttons then use this script:
    >
    > [php]
    > <?
    > session_start();
    > if(isset($_POST['button_name'])){
    > if ($_POST['vercode'] != $_SESSION['vercode'] OR
    $_SESSION['vercode']=='')
    > {
    > // echo '<strong>Error
    Message</strong><br>';
    > $error = '<strong><font
    color="#FF0000">Error
    > Message</font></strong><br>';
    > } else {
    >
    > //Add the page data
    >
    > }
    > ?>
    > [/php]
    >
    >
    >
    > "AngryCloud" <[email protected]> wrote
    in message
    > news:fecu6r$cl5$[email protected]..
    >>I am a newbie to JavaScript, so hopefully someone can
    answer this for me.
    >>
    >> On my user registration form, I have two buttons
    that submit the form,
    >> 'check_availability' (to check if the username is
    available) and
    >> 'register'. In
    >> my PHP script, I check which button was pushed by
    checking which POST
    >> value is
    >> set, $_POST['check_availability'] or
    $_POST['register'].
    >>
    >> If I set the 'register' button to a JavaScript
    function that validates
    >> the
    >> form and then submits it, how do I get my PHP script
    to think 'register'
    >> was
    >> pushed?
    >>
    >
    >

  • Is there a declarative way to include my own javascript 'on submit'?

    I try to integrate a third party editor (CKEditor) into my ADF 11.1.1.2.0 application. This editor converts a normal inputText item through javascript into a full wysiwyg HTML editor. In need this because the default richTextEditor has limited functionality. The problem I encounter is that this editor needs a piece of javascript to be executed to sync the editor-content with the related inputText before the item is submitted. This is especially needed in case of partial submits. I don't want to include a call to the script in all items that can cause a partial submit.
    So what I'm looking for is a hook into the clientside lifecycle when the form is (partially) submitted.
    I have tried several ways to initiate the script before the form is (partially) submitted:
    1: Added a clientlistener to the item of type 'blur' or type 'valueChange'. Both fail to work in some cases and some browsers, probably because the rich editor itself does a lot of eventhandling.
    2: Added a custom clientside validator. This seems to work but the problem is that client side custom validators are only fired when the item is required and my items is not required. I don't know the reason why an item has to be required to fire the custom validators. I thought it was a bug, but chapter 4.2 of the FusionWebUIGuide describes this behavior.
    Both declarative ways fail to work. I have found a solution that works but this solution is a 'dirty' one. What I did is overriding the javascript method that processes the validators:
    AdfDhtmlPage.prototype._oldProcessValidators = AdfDhtmlPage.prototype._processValidators;
    AdfDhtmlPage.prototype._processValidators = function (x275, x276, x277) {
    // Do my javascript thing
    var result = this._oldProcessValidators(x275, x276, x277);
    return result;
    Although this solution works in all situations and in all browsers, I don't realy like it. So my question is: Is there a declarative way to include my script-call before the form is partially submitted?

    Hi,
    For your information, we have integrated FCKEditor (CKEditor's ancestor) into an ADF 11g application.
    I know it is very different from CKEditor, but we have been forced to create our own JSF component and made several hooks to the framework to make it behave like desired.
    One of the problem we have faced is the lost of the input values when partial submit was performed on the editor isntance.
    Just so you know it might be real hard to integrate the component without creating a JSF component.
    Regards,
    JP

  • Start Computation from Javascript APEX 4.0

    Hello,
    I'm using Apex 4.0 and i need to do a computation to get the value from the database for some items.
    The problem is that i must run this computation by pressing a link(javascript).
    I would like to know if i can start a computation from a javascript function.
    Thanks in advance,
    Kind Regards,
    Dan

    Hi Dan,
    the easiest way to do this is using the ApexLib Framework, this comes with "AJAX Computations". See this Blog posting for Details: http://www.oracle-and-apex.com/ajax-computations-rich-client-feeling/
    brgds,
    Peter
    Blog: http://www.oracle-and-apex.com
    ApexLib: http://apexlib.oracleapex.info
    BuilderPlugin: http://builderplugin.oracleapex.info
    Work: http://www.click-click.at

  • Adding Javascript on Submit

    I distribute my forms and I want to set a Javascript that preforms my "Clear Form" button actions upon the user submitting the form.  My clear button is set to only clear certain fields, I do not want it to clear the entire form.
    Thanks

    Thanks!
    Where do I put the code for it to reset when it's submitted?  I don't actually have a "submit" button, I distribute the form and then they use the Adobe submit button.

  • CommandButton set to only call javascript, not submit the page

    Hello All,
    I have a problem with commandButton. I would like to use commandButton just to call JavaScript. When the user clicks the button, a JS function runs. My problem, is that I don't want to submit the form, right then. I leave the action and actionListener attributes out, but the command button still submits the form. Is there a better way to do this?
    Thanks,
    Grae

    IF you don't want a submit button, then why you use it?
    I mean if you want a button that calls a javaScript code then use:
    <input type="button" value="xxxx" onclick="xxx( )" />However, if you want to use a submit button (commanButton) but you want to contorl the submission based on JavaScript result fucntion then use:
    <h:commandButton onClick="return xxx( ) " ......................... />note the keyword return above, and don't forget to return ture (to submit the page) or false( to ban submission).

  • Weirdness when trying to use javascript to submit a button on a jsf page

    code in question:
    document.forms['logoutForm'].elements['logoutForm:_id7'].click();
    alert("button clicked");
    This works fine as is, the form gets submitted. I have to use this because there are multiple submits in this form for different things. Edit: What I mean is that I am submitting if the user presses the enter key from a text input and since I have multiple submits, I have to choose a particular one, I can't just use the form.submit() function.
    The problem arises if I take out the alert. No alert box, it stops working - no submit. Alert popup included, I get the popup, but the page submits correctly AFTER I close the popup, even though the alert is after the submit in the code.
    Anyone know what gives and how I can get the submit to work without the alert?
    Message was edited by:
    kdavenport
    It appears that this might be an IE issue as it works in Firefox. Any thoughts?
    Message was edited by:
    kdavenport

    This reply skirts around your actual question, but perhaps it may be useful for your situation. This link describes a JSF component that allows you to define the default action for your page, that is, the one that gets submitted when the Enter key is pressed:
    http://www.jsftutorials.net/defaultActionTag.html
    Note that you will see some warnings flash across the console when this component loads on the page (if you're monitoring that). As I understand it, this is because no renderer is specifically assigned for this component. Your default renderer will kindly do the job, but you'll still see the warning in development. It's nothing to worry about.

Maybe you are looking for