This discussion is archived
5 Replies Latest reply: Oct 8, 2012 5:55 AM by Prabodh RSS

display process message

951106 Newbie
Currently Being Moderated
Hi,

I'm using an ajax process for calendar drag and drop, but the success/error message is not getting displayed. I tried using following code also


htp.p('<script type="text/javascript">');
htp.p('alert("Time and date updated")');
htp.p('</script>');

Please suggest some ideas..
  • 1. Re: display process message
    Prabodh Guru
    Currently Being Moderated
    Hi,
    I'm using an ajax process for calendar drag and drop, but the success/error message is not getting displayed. I tried using following code also
    htp.p('<script type="text/javascript">');
    htp.p('alert("Time and date updated")');
    htp.p('</script>');

    Please suggest some ideas..>
    Injecting JS with ondemand process is not going to work.

    A better approach would be to put the alert in your JS, where you make the AJAX call, after the call has completed and conditional on the result of the call.

    Cheers,
  • 2. Re: display process message
    951106 Newbie
    Currently Being Moderated
    Hi,
    I tried displaying the message as below, from the javascript where ajax call is made, but no response..


    var ajaxreq = new htmldb_get(null,$v(pFlowid),APPLICATION_PROCESS = 'Calendar_drag_drop',$v(pFlowstepId));
    ajaxreq.addparam('x01',$v('p13_resv_no'));
    ajaxreq.addparam('x02',$v('p13_seq'));

    if(P15_msg='Y')
    {
    window.alert('Date and time updated');
    }
    else if(P15_msg='N')
    {
    window.alert('Time conflict detected');
    }
  • 3. Re: display process message
    Prabodh Guru
    Currently Being Moderated
    Hi,
    >
    I tried displaying the message as below, from the javascript where ajax call is made, but no response..
    var ajaxreq = new htmldb_get(null,$v(pFlowid),APPLICATION_PROCESS = 'Calendar_drag_drop',$v(pFlowstepId));
    ajaxreq.addparam('x01',$v('p13_resv_no'));
    ajaxreq.addparam('x02',$v('p13_seq'));
    
    if(P15_msg='Y')
    {
    window.alert('Date and time updated');
    }
    else if(P15_msg='N')
    {
    window.alert('Time conflict detected');
    I do not see the AJAX call being made. Where is the response being obtained from the AJAX call?Where is the get() ?
    See Invoke the On Demand Process When Department Name is Selected here http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/hol08/apexweb20/ajax_otn.htm

    Cheers,
  • 4. Re: display process message
    951106 Newbie
    Currently Being Moderated
    Hi,
    Thank you for reply..I'm not having such a code as u referred. i'm just doing a drag and drop in calendar. if it happens i need to display success message and if not, then error message. I dont know where to put this code to check condition.

    So I added those condition in page template where the value is set to the variables of drag and drop..

    where can I check this in my page?
  • 5. Re: display process message
    Prabodh Guru
    Currently Being Moderated
    Thank you for reply..I'm not having such a code as u referred. i'm just doing a drag and drop in calendar. if it happens i need to display success message and if not, then error message. I dont know where to put this code to check condition.
    So I added those condition in page template where the value is set to the variables of drag and drop..

    where can I check this in my page?>
    I do not understand you any more.

    I can see that you are creating a AJAX request but not actually making the call. So, why do you have the request prepared? What does this OnDemand process do and what does it return?
    From what I am seeing your code does not actually run the On Demand process. In which case, what can it return? As a corollary , you do not need the On Demand process as you do not appear to be using it.

    The location of the alert will depend on how you are accomplishing your drag and drop feature. It will be in that JS code.

    Cheers,

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points