hello!
working on a html email project at the moment and i'm trying to automate
the conversion process from html document, into the format i need for my
asp script.
what i need to write is a search and replace function (i think!)
for example i need to turn:
<html>
<head>
<title>test</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<table border="0" cellspacing="0" cellpadding="3">
<tr>
<td>name</td>
</tr>
<tr>
<td>line two</td>
</tr>
<tr>
<td>line three</td>
</tr>
</table>
</body>
</html>
into this:
mailbody = "<html>"
mailbody = mailbody & "<html>"
mailbody = mailbody & "<head>"
mailbody = mailbody & "<title>test</title>"
mailbody = mailbody & "<meta http-equiv=""Content-Type""
content=""text/html; charset=iso-8859-1"">"
mailbody = mailbody & "</head>"
mailbody = mailbody & "<body>"
mailbody = mailbody & "<table border=""0"" cellspacing=""0""
cellpadding=""3"">
mailbody = mailbody & "<tr>"
mailbody = mailbody & "<td>name</td>"
mailbody = mailbody & "</tr>"
mailbody = mailbody & "<tr>"
mailbody = mailbody & "<td>line two</td>"
mailbody = mailbody & "</tr>"
mailbody = mailbody & "<tr>"
mailbody = mailbody & "<td>line three</td>"
mailbody = mailbody & "</tr>"
mailbody = mailbody & "</table>"
so thats basically adding ' mailbody = " ' to the 1st line, ' mailbody =
mailbody & " ' to the start of the following lines and a ' " ' to then
end of the line. also andy ' " ' need to change to ' "" '.
i will also need to feed areas of the html with dynamic data - for
example the text 'name' would have to be changed to:
" & results.fields.item("FIRSTNAME").value & "
so the line becomes:
mailbody = mailbody & "<td>" & results.fields.item("FIRSTNAME").value &
"</td>"
all very time consuming to do manually!
i'm looking around and getting started on stuff but would be interested
if the list thinks this kind of thing is possible? what i'm thinking of
is a form page that asks you for an html document you want to convert,
which then points to the script which amends it, saves it and then
pass's the file name onto the email script as an include....
woooo!!!
any thoughts would be grand,
cheers,
jake
---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]