Re: Problems with PL/SQL Web Toolkit

From: Chris <cs123._no_spam__at_telstra.com>
Date: Tue, 04 Nov 2003 07:17:42 GMT
Message-ID: <qoIpb.177904$bo1.23733_at_news-server.bigpond.net.au>


 
"Alex" <alex.iava__NOSPAM___at_tiscali.it> wrote in message news:bo5emu$c3q$1_at_newsread.albacom.net...
 
"Chris" <cs123._no_spam__at_telstra.com> wrote in message news:%Vqpb.176918$bo1.90225_at_news-server.bigpond.net.au...
>
[cut]
>
> Can you supply the code for the form and the procedure
>
The code of the first procedure ("Prova_form") is:
 
procedure PROVA_FORM as
begin
htp.htmlopen;
htp.headopen;
htp.print('<script language="JavaScript">');
htp.print('function checkForm(f)');
htp.print(' {');
htp.print(' if ((f.nome.value == "") || (f.cognome.value == ""))');
htp.print(' {');
htp.print(' alert("Inserire il nome e il cognome")');
htp.print(' return false');
htp.print(' }');
htp.print(' else');
htp.print(' {');
htp.print(' return true');
htp.print(' }');
htp.print(' }');
htp.print('</script>');
htp.headclose;
htp.bodyopen(cattributes => 'bgcolor="#800000"');
htp.fontopen('#c0c0c0', cface => 'Verdana', csize => '4');
htp.formopen('web_pack.risultato', 'GET', cattributes => 'name="miaForm" onsubmit="return checkForm(this)"');
htp.bold('Indicare il nome: ');
htp.formtext('nome', '25', '20', null, 'style="color: #0000ff;"');
htp.br;
htp.bold('Indicare il cognome: ');
htp.formtext('cognome', '25', '20', null, 'style="color: #0000ff;"');
htp.br;
htp.formsubmit('btnSubmit', 'INVIA');
htp.formclose();
htp.fontclose;
htp.br;
st_tabella2;
htp.bodyclose;
htp.htmlclose;
end PROVA_FORM;
The code of the second proc ("risultato") is:
 
procedure RISULTATO(nome in varchar2 default null,
cognome in varchar2 default null) as
begin
htp.print(nome);
htp.print(cognome);
exception
when others then
htp.print('Errore');
end RISULTATO;

I modified the settings for the "Package/Session State" in the DAD configuration and I selected "Stateless (Perserve Package State)". With this last update, I have no errors if I call the second procedure ("risultato") with parameters in the URL (i.e. web_pack.risultato?nome=aaaa&cognome=bbbb). But If I try to execute it as result of the form I get the errors...
Could you please help me?
Thanks
 
Alex
 
I a bit scratchy with my Web PLSQL but you need an parameter in the second procedure to handle the submit item in the form.
 
Try adding  RISULTATO(nome in varchar2 default null, cognome in varchar2 default null, INVIA in varchar2 default null)
 
That should work OK. Any reason why your using a get method instead of post.
 
 
Received on Tue Nov 04 2003 - 08:17:42 CET

Original text of this message