|
Posted by John Hosking on 03/28/07 22:45
DennBen wrote:
>
> myVariable = '"Our values are the backbone of our business"<BR>"This
> set of quotes will break it"'
>
> <FORM ACTION="action.cfm?" METHOD="Post">
> <INPUT TYPE="Hidden" NAME="Mission" VALUE="#myVariable#">
> <input type="image" src="/images/buttons/btn_approve_profile.gif"
> width="121" height="19" value="submit" alt="Approve Profile"
> border="0">
> </FORM>
Well, this is one of the wildest guesses I've ever pulled out of my, um,
ear, but how about this: use the same delimiters for the parameter
(VALUE="") as in the variable definition (myVariable = ""), and *invert*
the quotes for the variable contents. Or vice-versa, since you want the
passed variable to include double quotes. I mean, try:
myVariable = '"Our values are the backbone of our business"<BR>"This
set of quotes will break it"'
and
<INPUT bla bla VALUE='#myVariable#'>
Then, when the variable's _value_, "Our values yadda hooey... break it"
get dropped into the VALUE parameter (delimited by single quotes)
there's no conflict; you end up with <INPUT bla bla VALUE='"Our values
yadda hooey... break it"'> and the form knows what you want. Does that
work for you?
--
John (offering triple-your-money back if the tip doesn't satisfy you!)
[Back to original message]
|