Re: using a double quote character inside a text field as an initial value...

From: <mark_at_vitalworks.com>
Date: Tue, 02 Nov 1999 15:08:41 GMT
Message-ID: <7vmupm$t9$1_at_nnrp1.deja.com>


All the other answers are good also, but note that in HTML the value="" syntax does require the double quotes to work correctly.

<input type=text name=text_field value='||<some_database_value_here>||'>

should and does work.

In article <7vmeea$765$1_at_taliesin.netcom.net.uk>,   "Steve B" <steve.bright_at_capgemini.co.uk> wrote:
> Hope you can help...we're currently generating dynamic web pages using
> Oracle Application Server....
>
> Most of the pages require the use of forms to capture user
information, and
> a lot of these forms are populated with database information so it
can be
> updated etc......
>
> we define things such as text fields as
>
> <input type="text" name="text_field" value=" '||
> <some_value_from_the_database> ||' ">
>
> where '|| ||' are the Oracle concatenation marks for those HTMLers
> amongst you.....
>
> Now the problem we have is when the database value to set the initial
text
> value contains the double quote character "......If it does then only
the
> string up to that point is displayed.....
>
> Obviously we cant use the single quote ' to suround the value because
the
> same would apply if the string contained that character....
>
> I've written a procedure in Oracle that mimics the javascript escape()
> function so I thought of storing each value in a javascript parameter
> escaped ), and then when the form has loaded populate the form
values using
> javascript.
>
> Is there any other way around this cos it will take ages to
> re-write...except to bar the entry of double quotes at any point
within the
> site..bearing in mind that this is pointless because data can get
into the
> database from areas other than the browser front end ???
>
> Cheers for any help..
>
> Steve Bright
>
> steve.bright_at_capgemini.co.uk
>
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Tue Nov 02 1999 - 16:08:41 CET

Original text of this message