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 " 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 " 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
YAHOO! GROUPS LINKS
|