Thank you Mel and Ron.  Encode/&quote did the trick!

Regards,
Penny Lancor



Mel Rothman <[EMAIL PROTECTED]>
Sent by: [email protected]

01/26/2006 08:15 AM

Please respond to
[email protected]

To
[email protected]
cc
Subject
Re: [Easy400Group] Re: Using updHtmlVar and a variable containing double quotes





Not encoding the quotation mark may or may not be the problem, but it's probably a good idea to do so anyway.

The CGIDEV2 encode or encode2 subprocedure can be used to do this. For details, look at those procedures in CGIDEV2/QRPGLESRC,PROTOTYPE2.
For example:

updHtmlVar('BrfTx': encode(%trimr(BrfTx)));

Mel Rothman
Mel Rothman, Inc.


Ron Egyed wrote:

The double quote needs to be converted to &quot; before using the
updHtmlVar procedure.

Your html probably looks something like this. . .
<INPUT type="text" name="myfield" value="/%myfield%/">

Assume the value of "myfield" is '"some data'
The resulting html will look like this.
<INPUT type="text" name="myfield" value=""some data">
This will cause the browser to display blanks in the form field.

Changing the double-quote to &quot; will prevent this from happening.


--- In
[email protected], Mel Rothman <[EMAIL PROTECTED]> wrote:
>
> This is working fine for me.
>
> I tested with the sample program, TEMPLATE5, with inputs into the
> customer name field up to 40 characters containing any number of
> quotation marks.   The  string is always received and echoed back
> without error.
>
> I suspect that something else is going on.
>
> One possibility is that the name in the output HTML doesn't match
the
> name in the call to UpdHtmlVar.
>
> Another is that you are clearing the output variables with a
subsequent
> use of UpdHtmlVar before writing the section that contains BrfTx.
>
> Mel Rothman
> Mel Rothman, Inc.
>
>
> pblancor wrote:
>
> > I am using updHtmlVar to update a text field.  Normally, it works
> > great.  However, when the text string contains a double quote
("), the
> > field is displayed as blanks.
> >
> > The value for BrfTx variable is:
> > "Seeing" Suggestion and Comments as you make comments.
> >
> > My code:
> > updHtmlVar('BrfTx': BrfTx   );
> >
> > When the page is displayed, the value of BrfTx is blank.
> >
>







SPONSORED LINKS
How to format a computer hard drive Cobol programmer Iseries 400
How to format a computer How to format your computer How to format computer



YAHOO! GROUPS LINKS






SPONSORED LINKS
How to format a computer hard drive Cobol programmer Iseries 400
How to format a computer How to format your computer How to format computer


YAHOO! GROUPS LINKS




Reply via email to