Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2006
    Posts
    2

    Unanswered: Oracle’s pl/sql web tookit

    I am trying to write a web page using Oracle’s web tookit, I have managed to write a simple page that passes info to another page but I am struggling to create a more dynamic page.

    I basically want to create a page that :
    Shows a simple yes/no questions
    Then based on the answer the user enters for that question asks another question.
    This process continues until the last question is reached.

    This is obviously a simple event driven process and I am able to write a pl/sql procedure to work out what the next question should be. But I am a relative novice using the web tool kit, so would appreciate some advice on how to create the actual web page, from the database (or some advice on any good online references).

  2. #2
    Join Date
    Dec 2003
    Location
    Oklahoma, USA
    Posts
    354
    Try these:

    Code:
    procedure my_form
    is
    begin
       htp.htmlopen;
       htp.bodyopen;
       htp.formopen( url_p=>'next_form' );
       htp.print( 'Yes?' );
       htp.formradio( name_p=>'yes_no', value_p=>'yes' );
       htp.print( 'No?' );
       htp.formradio( name_p=>'yes_no', value_p=>'no' );
       htp.formsubmit();
       htp.formclose();
       htp.bodyclose();
       htp.htmlclose();
    end;
    
    procedure next_form( yes_no varchar2 default null )
    is
    begin
       htp.htmlopen;
       htp.bodyopen;
       htp.formopen( url_p=>'my_next_form');
       if yes_no = 'yes' then
          -- do something
       else
          -- do something else
       end if;
       htp.formclose();
       htp.bodyclose();
       htp.htmlclose();
    end;
    Didn't actually compile these yet, but we've done similar for years now... hope this helps.
    JoeB
    save disk space, use smaller fonts

  3. #3
    Join Date
    Jan 2006
    Posts
    2
    Thanks for the example I will try it out!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •