Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

problem with HTML in value of a hidden form field?

LEGEND ,
Mar 17, 2007 Mar 17, 2007
Hi,

I am using DMXZONE's Advanced HTML Editor with ASP/VBScript.

I have a form on a page which asks for some details, and also has a Text
Area field to allow people to enter a message. This message can contain
HTML, using the HTML editor to make text bold, different colours etc -
nothing too fancy.

I am initially submitting this to a confirmation page which displays the
form field contents to allow a user to preview what they've entered before
saving to database.

I have created hidden form fields on the confirmation page containing the
form field data submitted from the previous page to use for my INSERT
behaviour, however the text area fields' data (which contains the HTML) is
causing problems with my page in that the "" entered in the HTML is wrecking
my form.

Here is an example of the type of data this field can contain:
<input name="giftmessage" type="hidden" id="giftmessage" value="<p><font
face="Georgia" color="#cc9933">Test</font></p>">

I'm sure that the problem is the "" around the font face and colour. Is
there any way to code that form field value to ignore the ""?

Hope someone can help (no-one in at DMX Zone it would appear). Thanks.

Regards
Nath.



TOPICS
Server side applications
458
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 17, 2007 Mar 17, 2007
tradmusic.com wrote:

> Hi,
>
> I am using DMXZONE's Advanced HTML Editor with ASP/VBScript.
>
> I have a form on a page which asks for some details, and also has a Text
> Area field to allow people to enter a message. This message can contain
> HTML, using the HTML editor to make text bold, different colours etc -
> nothing too fancy.
>
> I am initially submitting this to a confirmation page which displays the
> form field contents to allow a user to preview what they've entered before
> saving to database.
>
> I have created hidden form fields on the confirmation page containing the
> form field data submitted from the previous page to use for my INSERT
> behaviour, however the text area fields' data (which contains the HTML) is
> causing problems with my page in that the "" entered in the HTML is wrecking
> my form.
>
> Here is an example of the type of data this field can contain:
> <input name="giftmessage" type="hidden" id="giftmessage" value="<p><font
> face="Georgia" color="#cc9933">Test</font></p>">
>

value="<p><font face='Georgia' color='#cc9933'>Test</font></p>">

Mick
>
>
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 19, 2007 Mar 19, 2007
Hi Mick,

So I guess I'll have to go back to the authors of Advanced HTML Editor and
ask if it's possible to change the ", that the Advanced HTML Editor
extension is automatically creating, to '.
I've been struggling to get a response from DMXZONE though (e-mail or
forums).

If I remove that extension, and revert back to a plain text area, and enter
something with quotes in the text, it doesn't wreck my hidden form field and
seems to work. Is it just because the quotes are within an HTML tag that
causes the problem?

Thanks.
Nath.

"Mick White" <himselfBOGUS@mickweb.com> wrote in message
news:ethlpf$km3$1@forums.macromedia.com...
> tradmusic.com wrote:
>
>> Hi,
>>
>> I am using DMXZONE's Advanced HTML Editor with ASP/VBScript.
>>
>> I have a form on a page which asks for some details, and also has a Text
>> Area field to allow people to enter a message. This message can contain
>> HTML, using the HTML editor to make text bold, different colours etc -
>> nothing too fancy.
>>
>> I am initially submitting this to a confirmation page which displays the
>> form field contents to allow a user to preview what they've entered
>> before saving to database.
>>
>> I have created hidden form fields on the confirmation page containing the
>> form field data submitted from the previous page to use for my INSERT
>> behaviour, however the text area fields' data (which contains the HTML)
>> is causing problems with my page in that the "" entered in the HTML is
>> wrecking my form.
>>
>> Here is an example of the type of data this field can contain:
>> <input name="giftmessage" type="hidden" id="giftmessage" value="<p><font
>> face="Georgia" color="#cc9933">Test</font></p>">
>>
>
> value="<p><font face='Georgia' color='#cc9933'>Test</font></p>">
>
> Mick
>>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 19, 2007 Mar 19, 2007
tradmusic.com wrote:

> Hi Mick,
>
> So I guess I'll have to go back to the authors of Advanced HTML Editor and
> ask if it's possible to change the ", that the Advanced HTML Editor
> extension is automatically creating, to '.
> I've been struggling to get a response from DMXZONE though (e-mail or
> forums).
>
> If I remove that extension, and revert back to a plain text area, and enter
> something with quotes in the text, it doesn't wreck my hidden form field and
> seems to work. Is it just because the quotes are within an HTML tag that
> causes the problem?
>
> Thanks.
> Nath.

Yes, you probably should escape quotes within an HTML tag.

"<font color=\"red\">stuff</font>"
OR:

"<font color='red'>stuff</font>"
'<font color="red">stuff</font>'

But the whole concept is flawed, imho;
Mick

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 19, 2007 Mar 19, 2007
On Mon, 19 Mar 2007 14:19:30 -0000, "tradmusic.com"
<sales@NOSHPAMtradmusic.com> wrote:

>I've been struggling to get a response from DMXZONE though (e-mail or
>forums).

Support their is virtually non-existent in my experience. Good luck.
--
Steve Fleischer
steve at flyingtigerwebdesign dot com
Hong Kong
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 20, 2007 Mar 20, 2007
Yes, it's pretty appalling Steve to be honest.
I purchased Advanced HTML Editor, e-mailed support within about 4-5 days of
purchase, and haven't heard anything since...talk about "take the money and
run".

Won't be purchasing from DMXZONE again.

Nath.

"Steve Fleischer" <me@invalid.com> wrote in message
news:pcetv291558mkq7cm5h4asd3j6cre996oa@4ax.com...
> On Mon, 19 Mar 2007 14:19:30 -0000, "tradmusic.com"
> <sales@NOSHPAMtradmusic.com> wrote:
>
>>I've been struggling to get a response from DMXZONE though (e-mail or
>>forums).
>
> Support their is virtually non-existent in my experience. Good luck.
> --
> Steve Fleischer
> steve at flyingtigerwebdesign dot com
> Hong Kong


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 02, 2007 May 02, 2007
LATEST

"Mick White" <himselfBOGUS@mickweb.com> wrote in message
news:etm9j5$dgv$1@forums.macromedia.com...
> tradmusic.com wrote:
>
>> Hi Mick,
>>
>> So I guess I'll have to go back to the authors of Advanced HTML Editor
>> and ask if it's possible to change the ", that the Advanced HTML Editor
>> extension is automatically creating, to '.
>> I've been struggling to get a response from DMXZONE though (e-mail or
>> forums).
>>
>> If I remove that extension, and revert back to a plain text area, and
>> enter something with quotes in the text, it doesn't wreck my hidden form
>> field and seems to work. Is it just because the quotes are within an
>> HTML tag that causes the problem?
>>
>> Thanks.
>> Nath.
>
> Yes, you probably should escape quotes within an HTML tag.
>
> "<font color=\"red\">stuff</font>"
> OR:
>
> "<font color='red'>stuff</font>"
> '<font color="red">stuff</font>'
>
> But the whole concept is flawed, imho;
> Mick
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines