It is not a bad idea to run all the alpha fields you are outputting to the browser through the encode procedures. This should protect you from any HTML control characters embedded in your alpha fields that could wreck you web page.
Robert Dunn --- [EMAIL PROTECTED] wrote: > Thank you Mel and Ron. Encode/"e 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 " > 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 > 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 > > Visit your group "Easy400Group" on the web. > > To unsubscribe from this group, send an email to: > [EMAIL PROTECTED] > > Your use of Yahoo! Groups is subject to the Yahoo! > Terms of Service. > > > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/Easy400Group/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
