Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: owa htp/htf multiple submit buttons on form how ?

Re: owa htp/htf multiple submit buttons on form how ?

From: Christopher Beck <clbeck_at_us.oracle.com>
Date: Fri, 17 Sep 1999 10:14:44 -0400
Message-ID: <50niN4sch1BfD3jaKMOYwuHwV5F8@4ax.com>


On Fri, 17 Sep 1999 13:28:49 GMT, Ronald J.H. Rood <ronr_at_my-deja.com> wrote:

>Hi,
>
>I made a little form containing some entry fields and 3 buttons;
>reset,update, delete. In the htp.formopen one specifies the url of the
>script to be executed by the submit button. Since I have 2 submit type
>of buttons, how do I specify the other url for the (in this case
>'delete') button so that it also receives the value[s] entered in the
>form ? (delete only needs one).
>
>thanks for any usefull tip/comment,
>Ronald

You could write a single accept routine that the HTML form will submit to and then in pl/sql determine which button was pressed. You can do this by defining a value and a name for the submit button.

eg.

create or replace
procedure show_form as
begin
  htp.formOpen( 'accept_form' );

    htp.formText( 'p_text1' );
    htp.formText( 'p_text2' );
    htp.formSubmit( 'p_action', 'Update' );
    htp.formSubmit( 'p_action', 'Delete' );
  htp.formClose;
end show_form;
/

The accept procedure could look something like the following...

create or replace
procedure accept_form(

  p_text1 varchar2,
  p_text2 varchar2,
  p_action varchar2 ) as

begin
  if p_action = 'Update' then

hope this helps.

chris.

>
>http://home.wxs.nl/~ronr/RonR.html
>The best way to accellerate a computer running
>windows is at 9.8 ms/s^2
>
>
>Sent via Deja.com http://www.deja.com/
>Share what you know. Learn what you don't.

--
Christopher Beck
Oracle Corporation
clbeck_at_us.oracle.com
Reston, VA.



Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Fri Sep 17 1999 - 09:14:44 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US