|
Home > Archive > Macromedia Flash Server > April 2005 > Displaying images...
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Displaying images...
|
|
| Simon Lord 2005-04-25, 5:45 pm |
| How can we pass html code a user enters in on the CS successfully? On
the serverside I have this:
mesg = "<font color=\"#333333\"><b>" + mesg + "</font>";
.... and that works. The font gets coloured properly. But the problem
is if "mesg" itself contains any html it doesn't render at all and
simply gets spit out *as is* on everyone's chat window.
Do I need to perform some kind of toHTML(mesg) voodoo on it?
PS: if toHTML() actually exists then it's a fluke guess...
Sincerely,
Simon
=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
| |
| Richard Leggett 2005-04-25, 5:45 pm |
| Hey Simon,
Might try:
mesg = "<font color=\"#333333\"><b>" + escape(mesg) + "</font>";
....unescape on the client when received, and set the .htmlText property of
the textfield to the new value. Might need to escape() twice in certain
situations, worth playing with. Alternatively pass it as an XML object with
a CDATA block.
----- Original Message -----
From: "Simon Lord" <slord-1+jUDDTtyItWk0Htik3J/w@public.gmane.org>
To: <flashcomm-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org>
Sent: Monday, April 25, 2005 5:17 PM
Subject: [FlashComm] Displaying images...
> How can we pass html code a user enters in on the CS successfully? On
> the serverside I have this:
>
> mesg = "<font color=\"#333333\"><b>" + mesg + "</font>";
>
> ... and that works. The font gets coloured properly. But the problem
> is if "mesg" itself contains any html it doesn't render at all and
> simply gets spit out *as is* on everyone's chat window.
>
> Do I need to perform some kind of toHTML(mesg) voodoo on it?
>
> PS: if toHTML() actually exists then it's a fluke guess...
>
> Sincerely,
> Simon
>
>
> =-----------------------------------------------------------
> Supported by Fig Leaf Software - http://www.figleaf.com
> =-----------------------------------------------------------
>
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
| |
| Richard Leggett 2005-04-25, 5:45 pm |
| Erm sorry my brain was elsewhere. Please ignore that bit about escape() it
made no sense in that context.
But setting the .htmlText property is what I meant to say! (Also maybe close
that bold tag).
----- Original Message -----
From: "Simon Lord" <slord-1+jUDDTtyItWk0Htik3J/w@public.gmane.org>
To: <flashcomm-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org>
Sent: Monday, April 25, 2005 5:17 PM
Subject: [FlashComm] Displaying images...
> How can we pass html code a user enters in on the CS successfully? On
> the serverside I have this:
>
> mesg = "<font color=\"#333333\"><b>" + mesg + "</font>";
>
> ... and that works. The font gets coloured properly. But the problem
> is if "mesg" itself contains any html it doesn't render at all and
> simply gets spit out *as is* on everyone's chat window.
>
> Do I need to perform some kind of toHTML(mesg) voodoo on it?
>
> PS: if toHTML() actually exists then it's a fluke guess...
>
> Sincerely,
> Simon
>
>
> =-----------------------------------------------------------
> Supported by Fig Leaf Software - http://www.figleaf.com
> =-----------------------------------------------------------
>
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
| |
| Simon Lord 2005-04-25, 5:45 pm |
| The sample I posted was quick N dirty. So the missing </b> is
immaterial.
As for the .htmlText issue. I have that property set on the CS (both
message field and history fields), and any html I add from the SS
*does* work fine (as in my sample below). The issue is when 1 user
manually (or via a buttons that boldens the text) adds html which looks
fine on the CS in the message field, ends up as raw html on all CS's
history field (even though the htmlText is set to true).
To be more clear, if I type <b>hello</b> and hit send, all other CS
apps will display <b>hello</b> in grey text (because the SS does that)
but completely ignores the bold tags in the mesg container.
So I guess the question is, is the problem *really* on the SS? Should
I be *doing* something with/to the "mesg" container or should I be
focusing elsewhere?
On Apr 25, 2005, at 12:22 PM, Richard Leggett wrote:
> Erm sorry my brain was elsewhere. Please ignore that bit about
> escape() it
> made no sense in that context.
>
> But setting the .htmlText property is what I meant to say! (Also maybe
> close
> that bold tag).
>
> ----- Original Message -----
> From: "Simon Lord" <slord-1+jUDDTtyItWk0Htik3J/w@public.gmane.org>
> To: <flashcomm-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org>
> Sent: Monday, April 25, 2005 5:17 PM
> Subject: [FlashComm] Displaying images...
>
>
>
>
> =-----------------------------------------------------------
> Supported by Fig Leaf Software - http://www.figleaf.com
> =-----------------------------------------------------------
>
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
>
>
Sincerely,
Simon
=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
| |
| Simon Lord 2005-04-25, 5:45 pm |
| Ok, after mucking with this I think I found my problem:
<font color="#333333"><b>demo: </b><font
color="#009933"><b>hi</b></font><br>
The html, as entered on the CS seems to convert the thml into their
respective ascii representations.
Anyway to prevent that?
On Apr 25, 2005, at 12:50 PM, Simon Lord wrote:
> The sample I posted was quick N dirty. So the missing </b> is
> immaterial.
>
> As for the .htmlText issue. I have that property set on the CS (both
> message field and history fields), and any html I add from the SS
> *does* work fine (as in my sample below). The issue is when 1 user
> manually (or via a buttons that boldens the text) adds html which
> looks fine on the CS in the message field, ends up as raw html on all
> CS's history field (even though the htmlText is set to true).
>
> To be more clear, if I type <b>hello</b> and hit send, all other CS
> apps will display <b>hello</b> in grey text (because the SS does that)
> but completely ignores the bold tags in the mesg container.
>
> So I guess the question is, is the problem *really* on the SS? Should
> I be *doing* something with/to the "mesg" container or should I be
> focusing elsewhere?
>
>
> On Apr 25, 2005, at 12:22 PM, Richard Leggett wrote:
>
> Sincerely,
> Simon
>
>
> =-----------------------------------------------------------
> Supported by Fig Leaf Software - http://www.figleaf.com
> =-----------------------------------------------------------
>
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
>
>
Sincerely,
Simon
=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
| |
| Simon Lord 2005-04-25, 5:45 pm |
| Ok, this works from the SS:
mesg = mesg.split("<").join("<").split(">").join(">");
.... please let me know if this is not the best practice as I'm trying
*not* to develop worse habits than I already have :P
On Apr 25, 2005, at 2:05 PM, Simon Lord wrote:
> Ok, after mucking with this I think I found my problem:
>
> <font color="#333333"><b>demo: </b><font
> color="#009933"><b>hi</b></font><br>
>
> The html, as entered on the CS seems to convert the thml into their
> respective ascii representations.
>
> Anyway to prevent that?
>
>
>
> On Apr 25, 2005, at 12:50 PM, Simon Lord wrote:
>
> Sincerely,
> Simon
>
>
> =-----------------------------------------------------------
> Supported by Fig Leaf Software - http://www.figleaf.com
> =-----------------------------------------------------------
>
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
>
>
Sincerely,
Simon
=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
| |
| John Robinson 2005-04-25, 5:45 pm |
| As was suggested earlier, use unescape on the incoming message (SS).
John
On Apr 25, 2005, at 2:12 PM, Simon Lord wrote:
> Ok, this works from the SS:
>
> mesg = mesg.split("<").join("<").split(">").join(">");
>
> ... please let me know if this is not the best practice as I'm trying
> *not* to develop worse habits than I already have :P
>
>
>
>
> On Apr 25, 2005, at 2:05 PM, Simon Lord wrote:
>
> Sincerely,
> Simon
>
>
> =-----------------------------------------------------------
> Supported by Fig Leaf Software - http://www.figleaf.com
> =-----------------------------------------------------------
>
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
>
=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
| |
| Simon Lord 2005-04-25, 5:45 pm |
| Thanks John. When Richard's second email suggested I ignore the first
I did just that.
Everything works now, except this issue of images appearing on the
*following* line after the text. The manual says "In general images
appear on the following line" but then states if <img> tag is the first
char in the field the image will appear on the same line.
Not here. :P
On Apr 25, 2005, at 2:27 PM, John Robinson wrote:
> As was suggested earlier, use unescape on the incoming message (SS).
>
> John
>
> On Apr 25, 2005, at 2:12 PM, Simon Lord wrote:
>
>
>
> =-----------------------------------------------------------
> Supported by Fig Leaf Software - http://www.figleaf.com
> =-----------------------------------------------------------
>
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
>
>
Sincerely,
Simon
=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
|
|
|
|
|