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: javascript invoking PL/SQL --- encode problem

Re: javascript invoking PL/SQL --- encode problem

From: Gary Menchen <gary.e.menchen_at_dartmouth.edu>
Date: Tue, 13 Jan 2004 16:25:14 -0500
Message-ID: <bu1npj$ti9$1@merrimack.Dartmouth.EDU>


Robert C wrote:

> I use this javascript function below to display popup window.
> Works great until the pl/sql parameter contains special characters.
> .The parameter "ttext" is the complete pl/sql URL like:
>
> pkg.showpage?p_code=M%26M
>
> As you can see i DID encode 'M&M' to 'M%26M'
>
> But it still keeps failing...the web server kept interpreting '%26' as '&'
>
> This happens both on 8i+OAS4 and 9i+Apache
>
> Please help if you have a solution, thanks
>
>
> function popupGeneral(ttext)
> {w = open(ttext,"winLov","Scrollbars=1,resizable=1,width=500,height=350");
> if (w.opener == null)
> w.opener = self;
> w.focus();}
>
>

I looks like pkg.showpage?p_code=M%26M is invoked as a URL. So the conversion back to M&M would be made when the parameter is received by the showpage procedure. I assume that showpage is responsible for generating the javascript that pops up the new window. What happens if you re-encode the parameter in the showpage procedure?

Alternatively javascript has an encoding function. Received on Tue Jan 13 2004 - 15:25:14 CST

Original text of this message

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