Sending more than one name value pair via ajaxRequest.add()

Hi all,
I'm implementing AJAX in Oracle Application Express to perform DML operations on a table. I need to send more than one name value pair via the ajaxRequest object. Can someone guide me how to achieve this? Say for example i need to send 2 values(need to send 2 form elements when submit button is clicked) P3_region and P3_scope. i tried the following methods.
Method 1:
======
ajaxRequest.add('P3_region',document.getElementById('P3_region').value);
ajaxRequest.add('P3_scope',document.getElementById('P3_scope').value);
Method 2:
======
ajaxRequest.add('P3_region',document.getElementById('P3_region').value,'P3_scope',document.getElementById('P3_scope').value);
Neither of them is fruitful. Can someone guide me how to achieve this?
Regards,
Balaji Radhakrishnan.

Hi Roel,
The javascript goes like this.
<script language="JavaScript" type="text/javascript">
function getElement1()
document.getElementById('P3_Element1').value = '';
var ajaxRequest = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=Element1Process',0);
ajaxRequest.add('P3_Element2',document.getElementById('P3_Element2').value);
ajaxRequest.add('P3_Element3',document.getElementById('P3_Element3').value);
ajaxRequest.add('P3_Element4',document.getElementById('P3_Element4').value);
ajaxRequest.add('P3_Element5',document.getElementById('P3_Element5').value);
ajaxRequest.add('P3_Element6',document.getElementById('P3_Element6').value);
ajaxResult = ajaxRequest.get();
if(ajaxResult)
var wsArray = ajaxResult.split("~");
document.getElementById('P3_Element1').value = wsArray[0];
</script>
The application Process goes like this..
declare
v_Element1 VARCHAR2(60);
begin
select distinct Element1 into v_Element1 from TableA where Element2=:P3_Element2 AND Element3=:P3_Element3 AND Element4=:P3_Element4 AND Element5=:P3_Element5 AND Element6=:P3_Element6;
htp.prn(v_Element1);
exception
when others then
v_Element1 := 'Invalid Header Combination';
htp.prn(v_Element1);
end;
The requirement goes like this..
When i give Element2, Element3,Element4,Element5,Element6 as input in the form page the Element1 should get displayed automatically without refreshing the page. But when i use the above javascript and application process i get the Element1 loaded with some html scripts. I call the javascript using onChange() function.
Regards,
Balaji Radhakrishnan.

Similar Messages

  • How do I send pictures from iphoto to a group via email instead of to just one individual? I can't type in more than one name or send the pictures to a group.

    How do I send pictures from iphoto to a group via email instead of to just one individual? I can't type in more than one name or send the pictures to a group.

    I had a similar problem in that my wife's iphone 5 could not send pics with imessage.  Had to set the settings to default to SMS or whatever.  After laboring many hours on the web I coincidentally was on the phone with the internet people to question my internet speed.  They changed the router channel, which is something that I am capable of doing myself.  After that, the pics go over imessage.  My own Iphone didn't have the problem.  We are both latest IOS 7.0.6.

  • Sending more than one expense type via E-Mail possible?

    Hi to all!
    Is it possible to send more than one Expense Type via E-Mail to the CfTE system? If yes: How can I create it?
    Thanks for an answer!
    Andreas

    Hi Andreas,
    if you add several attachments to an e-mail, the system will create a separate expense for each attachment. One of these expenses will also get the information from the subject line of the e-mail.
    Apart from the attachment scenario, there is no option to create several expense based on a single e-mail.
    Regards,
    Andreas

  • SENDING MORE THAN ONE PIC VIA MMS

    is there any way i can send more than one pic via mms on the pre?!

    Hello and welcome to the forums;
    At this time, you can only attach one picture per message. You would need to send each picture as its own message.
    TreoAide

  • I'm using an iPhone 4. I used to be able to send more than one picture at a time to another iPhone. Now I get messages that it cannot be delivered.  What's going on?

    While on vacation in Canada in July I started having trouble sending more than one pix at a time to other users. I don't recall having this problem before. Is there a limit on the number of pictures you can send via text? I wonder if I messed up some settings while I was in Canada. I had things set so that I could not receive phone calls so I wouldn't get charged.  Could I have messed up text / multimedia settings as well?

        We want your phone working just as well now as it did before your trip, sngbrd9. Are you trying to send the pictures to other Apple users using iMessage or are they being sent through MMS/picture messaging? Are you able to send pictures one at a time to those same contacts without an error? Did you change any settings in your camera to have HDR now instead of a slightly lower resolution with a smaller file size? 
    JenniferH_VZW
    Follow us on Twitter www.twitter.com/vzwsupport

  • Sending more than one data to Socket

    Hi Guys
    How can i send more than one data to socket. What i have to do is
    in server side
    1) Want to send file data to socket
    2) and the name of the file to socket
    in client
    1) read the file data from socket
    2) read the file name from the socket
    3) and save the file.
    how can i do this, I know how to send only file data, but i am finding dificuilt to send both.
    please some one help me with sample code.
    Thanks in advance
    Shan

    Thanks for the reply
    the problem i am facing is send the file name and data together . I have modified a code to send the file data, giving the static file name at the client side. Could you please help me to modify the code to send both file name and data from server. I am pasting my code. Sorry to ask like this but i am struggling a lot in this issue. When you are free please help me.
    (Also i don't have any Duke dollers to assign for this post)
    import java.io.*;
    import java.net.*;
    class Server
    public static void main(String args[]) throws Exception
         try{
         String clientSentence;
         ServerSocket welcomeSocket = new ServerSocket(80);
         while(true)
              Socket connectionSocket = welcomeSocket.accept();
              BufferedReader inFromClient = new BufferedReader(new InputStreamReader(connectionSocket.getInputStream()));
              BufferedOutputStream outToClient = new BufferedOutputStream(connectionSocket.getOutputStream());
              System.out.println(inFromClient.readLine());
              int data;
              int totalSizeTransferred = 0;
              int totalSizeRead;
              int PACKET_SIZE = 20480;
              byte[] packet = new byte[PACKET_SIZE];
              System.out.println("reading file...");
              FileInputStream fis = new FileInputStream("36meg.pdf");
              while ((totalSizeRead = fis.read(packet, 0, packet.length)) >= 0)
                   outToClient.write(packet, 0, totalSizeRead);
                   totalSizeTransferred = totalSizeTransferred + totalSizeRead;
                   System.out.println(totalSizeTransferred);
         System.out.println("done reading file...");
         outToClient.close();
         fis.close();
         }catch(Exception ex){}
    import java.io.*;
    import java.net.*;
    class Client
         public static void main(String args[]) throws Exception
              String sentence;
              BufferedReader inFromUser = new BufferedReader(new InputStreamReader(System.in));
              Socket clientSocket = new Socket("194.129.252.65", 80);
              DataOutputStream outToServer = new DataOutputStream(clientSocket.getOutputStream());
              BufferedInputStream inFromServer = new BufferedInputStream(clientSocket.getInputStream());
              sentence = inFromUser.readLine();
              outToServer.writeBytes(sentence + '\n');
              FileOutputStream fos = new FileOutputStream("hello.jpg");
              int totalDataRead;
              int totalSizeWritten = 0;
              int DATA_SIZE = 20480;
              byte[] inData = new byte[DATA_SIZE];
              System.out.println("Begin");
         while ((totalDataRead = inFromServer.read(inData, 0, inData.length)) >= 0)
              fos.write(inData, 0, totalDataRead);
              totalSizeWritten = totalSizeWritten + totalDataRead;
              System.out.println(totalSizeWritten);
              System.out.println("Done");
              fos.close();
              clientSocket.close();

  • App that can send more than one attachment at a time....

    Does anyone know of a app that I can send more than one attachment at a time like resumes + cover letters. Not having any luck with gmail or pages for the Ipad.
    Please help

    The MPEG Streamclip app can batch process videos. It can even convert up to  4 videos at the same time.
    http://www.squared5.com/
    It's free...
    Just drop as many videos as you like into the batch window.

  • How can i send more than one signal to DMA FIFO?

    Hello,
    I'm trying to send more than one signal to DMA FIFO, but i don't know how to do. When i send one signal i don't have problems. I try to use one block DMA FIFO for one signal. For example if i have 3 signal i use · DMA FIFO but whe i want to wath them in a waveform chart the signals have a delay.
    How can I do to send more than one signal to DMA FIFO? and if that's no posible, How i can do for syncronizate the 3 signals?
    The data type of the signal is FXP <16,10>
    Regards.
    Pablo
    Solved!
    Go to Solution.
    Attachments:
    Block Diagram.jpg ‏81 KB
    Block Diagram.jpg ‏81 KB

    Not quite.  You need to use the Integer To Fixed Point Cast to change from the integers to your FXP numbers.  You can then build them into a cluster to write to the Waveform Chart.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines
    Attachments:
    Combine and Decode FXP.png ‏14 KB

  • How can I send more than one document on an email

    how can I send more than one document on one email

    Thank you but I understand that form of attaching a document. However when I select a document then click 'Share' I have the option of sending the document by email as a word or pages document or pdf, what I want to know is can I use this procedure to send more than one document per email and if I can how?

  • How can I send more than one foto in a email

    How can I send more than one foto in a email?

    Or, to send up to 5 photos in one email, open the Photos app, go to the Album containing the photos, tap Select, tap up to 5 photos (a blue tick will appear on them), then tap the Share icon (square with arrow pointing up) and choose Mail.
    If you choose more than 5 photos this way, you won't get the Mail option.

  • Sending more than one photo at a time

    OK, fine, no MMS. We have to e-mail our pics to our friends.
    But is there any way on an iPhone 3G to send more than one photo attachment at a time? Sometimes I'd like to send two or three pixs to my friends of an event and that means two or three separate e-mails that have to be addressed.
    Can't I just tag or mark more tan a single photo and send the bunch?

    unfortunately, its 1 picture only

  • TS2755 Ever since I updated my iphone 4 to 5.1.1, I am not able to send more than one picture at a time in a text message. Does anyone know how to fix this?

    Ever since I updated my iphone 4 to 5.1.1, I am not able to send more than one picture at a time in a text message. Does anyone know how to fix this?

    Yes, I know the photos stored on the device... But which app are you accessing the photos with? Which app do you want to be able to highlight more than one pic at a time in?
    There are literally thosands of apps that access the iOS Photo Library - which one(s) are you using?

  • CAN ANDROID SEND MORE THAN ONE PICTURE IN A SINGLE TEXT

    Hello,
    Can anyone tell me if Android Razr M is capable of sending more than one picture in a single email and how to do it?  Example:  I have several pictures to send to one person and do not want to send them one at a time if I don't have to.  Thank you

    Some devices if you long press on the text screen have the ability to send more than one photo. However your owners manual usually has this information.
    You also may not be able to send these multiples due to size constraints. Email is much better for these photos. Which of course is also limited by your ISP to around 10 megabytes per send.
    Good Luck

  • How to send more than one parameter from FORM to REPORT?

    Dear all,
    i can send one parameter from FORM to REPORT. but when i send more than one parameter it gives error: frm 41214 unable to run report.
    here is the code i think the error is in the following line of procedure:
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=no p_date_from='||v_date_from||'p_date_to='||v_date_to);
    where to place the parameters and is there any space is required?
    Thanks
    Muhammad Nadeem

    Dear Saeed Iqbal,
    thanks for you reply.
    dear i am using Form 10g run_product is not supported in this version.
    i am using RUN_REPORT_OBJECT.
    PROCEDURE rep_gl_ledger IS
    repid REPORT_OBJECT;
    v_rep VARCHAR2(100);
    rep_status VARCHAR2(50);
    v_date_from date;
    v_date_to date;
    v_detail_id_from varchar2(100);
    v_detail_id_to varchar2(100);
    v_voucher_type varchar2(100);
    --req_no char(17);
    BEGIN
    v_date_from :=      :ledger_para.p_date_from;
    v_date_to :=      :ledger_para.p_date_to;
    v_detail_id_from :=      :ledger_para.p_detail_id_from;
    v_detail_id_to :=      :ledger_para.p_detail_id_to;
    v_voucher_type :=      :ledger_para.p_voucher_type;
    repid := find_report_object('gl_ledger');
    --repid := find_report_object('REPORT80');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_EXECUTION_MODE,BATCH);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_COMM_MODE,SYNCHRONOUS);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESTYPE,CACHE);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'pdf');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,'rep_online_FRHome');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=no p_date_from='||v_date_from||'p_date_to='||v_date_to);
    --SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=no');
    v_rep := RUN_REPORT_OBJECT(repid);
    rep_status := REPORT_OBJECT_STATUS(v_rep);
    WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED')
    LOOP
    rep_status := report_object_status(v_rep);
    END LOOP;
    IF rep_status = 'FINISHED' THEN
    /* Display report in the browser */
    WEB.SHOW_DOCUMENT('http://'||:GLOBAL.G_IP||'/reports/rwservlet/getjobid'||substr(v_rep,instr(v_rep,'_',-1)+1)||'?','_blank');
    ELSE
         message('Error when running report');
    END IF;
    END;
    Regards:
    Muhammad Nadeem

  • Function with more than one return value

    Hi
    Please let me know how to write a function with more than one return value and in what scenario should we go for this option.
    Thank you

    user12540019 wrote:
    Please let me know how to write a function with more than one return value and in what scenario should we go for this option.Yes. And the following is the correct approach (using OUT variables is not!) - you deal with the multiple values as a data structure. This example uses an custom (user-defined) SQL data type as the structure.
    SQL> create or replace type TXYcoord is object(
      2          x       number,                  
      3          y       number                   
      4  );                                       
      5  /                                        
    Type created.
    SQL>
    SQL>
    SQL> create or replace function fooCoordinate( someParam number ) return TXYCoord is
      2  begin                                                                         
      3          -- doing some kind of calculation using input parameters              
      4          --  etc..
      5
      6          -- returning the multiple return values as a proper data structure
      7          return(
      8                  TXYcoord( 0, 0 )
      9          );
    10  end;
    11  /
    Function created.
    SQL>
    SQL> -- selecting the data structure
    SQL> select
      2          sysdate,
      3          fooCoordinate(123)      as XY
      4  from       dual;
    SYSDATE             XY(X, Y)
    2010-02-01 08:49:23 TXYCOORD(0, 0)
    SQL>
    SQL> -- selecting the properties/fields of the data structure
    SQL> select
      2          sysdate,
      3          treat( fooCoordinate(123) as TXYcoord).x        as X,
      4          treat( fooCoordinate(123) as TXYcoord).y        as Y
      5  from       dual;
    SYSDATE                      X          Y
    2010-02-01 08:49:23          0          0
    SQL>

Maybe you are looking for