hey sam,

thats cool and makes sense.

i've been searching and found this:

http://www.basic-ultradev.com/articles/SBBArticle1/index.asp

it outlines something very similar to what i'm trying to do. this bits 
of code come from that page

- this bit takes a single quote and then turns it into a double quote

theSelection = theSelection.replace(/\"/g,'""');

- this bit ads the line ending

theSelection = theSelection.replace(/\r\n/g,'") & vbcrlf \r\n 
Response.Write("');

- and this bit adds to the front of the line

theSelection = 'Response.Write("' + theSelection + '") & vbcrlf';

his example was to change this:

<table>
��<tr>
����<td bgcolor="#FF6699">Hello</td>
����<td bgcolor="#FFFFFF"><img src="smiley.gif"></td>
��</tr>
</table>

into this:

Response.Write("<table>") & vbcrlf
Response.Write(" ��<tr>") & vbcrlf
Response.Write(" ����<td bgcolor=""#FF6699"">Hello</td>") & vbcrlf
Response.Write(" ����<td bgcolor=""#FFFFFF""><img 
src=""smiley.gif""></td>") & vbcrlf
Response.Write(" ��</tr>") & vbcrlf
Response.Write("</table>") & vbcrlf

which is eventually, virtually what i'm trying to do!!

thing is, he's written the article around making a dw server behavior....

trying to amend the code now - what do we think??

cheers,

jake

On Wednesday, September 25, 2002, at 02:39 PM, Sam Thompson wrote:

> i know how you feel mate!
>
> In the HTML, have standard placeholders, like whereever you want the 
> name to
> appear, put $NAME and for the message put $MESSAGE
>
> This HTML is then pasted into a textarea by your user, and submitted to 
> your
> ASP page. Then you do:
>
> Dim strMessage
> strMessage = Trim(Request.Form("textarea_name"))
>
> ....
>
> strMessage = Replace(strMessage, "$NAME", objRS("FullName"))
> strMessage = Replace(strMessage, "$MESSAGE", objRS("EmailMessage"))
>
> ....
>
> objMail.Body = strMessage
>
> Does that make sense?
>
> Cheers, Sam


---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]

Reply via email to