Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: escaping the & (ampersand)
I don't think it's a problem of escaping the &.
I copied your code and made 2 small procedures and it works fine.
Here's my code:
PACKAGE BODY "TEST" is
procedure druk is
the_choice varchar2(30):='contents_choice';
the_hidden_field varchar2(30):='hidden';
begin
htp.p('Wait 3 sec');
htp.print('<meta http-equiv="refresh" content="3; URL=http://jerom/vlaris/plsql/test.param?p=' || the_choice ||'&p2=' ||
the_hidden_field || '">');
end druk;
procedure param (p IN varchar2, p2 in varchar2) is begin
htp.htmlopen; htp.headopen; htp.title ('TEST'); htp.headclose; htp.bodyopen; htp.p('parameter is : '); htp.p(p); htp.nl; htp.p('parameter 2 is : '); htp.p(p2); htp.nl; htp.print('EOF'); htp.bodyclose; htp.htmlclose;
end test;
When I open my browser in http://jerom/vlaris/plsql/test.druk it waits 3 sec and then i get http://jerom/vlaris/plsql/test.param?p=contents_choice&p2=hidden; the page which displays the two parameters.
I guess there's something wrong with the number/type of parameters of the procedure 'process'. (sorry I can't do more with just 1 line of code you sent)
HTH Jochen.
Marc Eilens schreef:
> Hi everybody,
>
> I've got a problem here building a html-page with the PL/SQL-Cartridge,
> namely I don't know how to escape the '&' (ampersand).
> Here's what I want to do:
> htp.print('<meta http-equiv="refresh" content="0;
> URL=http://somewhere/owas/plsql/process?choice=' || the_choice ||
> '&hidden=' || the_hidden_field || '">');
>
> I already tried: '\&' and '~&', but both don't work.
> Perhaps somebody knows how to it right.
>
> Please CC me, as I don't always have the possibility to have a look in
> the newsgroup.
>
> Thanks, Marc
>
> --
> Marc Eilens
> FB Angewandte Informatik, FH Trier, Germany
> [ Applied Computer Science, Tech. University of Trier ]
> Mail: eilensm_at_fh-trier.de
>
> ------------------------------------------------------------------------
>
> Name: vcard.vcf
> vcard.vcf Type: VCard (text/x-vcard)
> Encoding: 7bit
> Description: Card for Marc Eilens
Received on Wed Sep 16 1998 - 05:34:32 CDT
![]() |
![]() |