ASP to HTML Component

T

Tom Ticknor

I am creating a page dynamically in ASP by gathering data
from a database. I wish to email the resulting page to
my user group by using the CDOSYS HTMLbody. The problem
is I don't know how to capture the dynamically created
page and save as a static html page so I can read it to
create the HTMLbody for my email.

I really need a solution to this problem.
 
T

Tom Ticknor

The procedure outlined at the site you provided does an
excellent job with static HTML pages. What I need is a
procedure to do basically the same thing with an ASP
page.
Following the examples at the aspfaq site if I create a
simple html page it works but if I take that same page,
make it an asp page (nothing else different) and execute
the code I get the following error:

maxml3.dll error '80004005'

Unspecified error

and lists the ASP line number which is the line with the

xmlhttp.send ""

on it.
 
R

Ray at

Tom Ticknor said:
The procedure outlined at the site you provided does an
excellent job with static HTML pages. What I need is a
procedure to do basically the same thing with an ASP
page.

It doesn't matter if the remote page is an asp page or anything else.

Following the examples at the aspfaq site if I create a
simple html page it works but if I take that same page,
make it an asp page (nothing else different) and execute
the code I get the following error:

maxml3.dll error '80004005'

Unspecified error

and lists the ASP line number which is the line with the

xmlhttp.send ""

on it.

Post your code.

Ray at work
 
T

Tom Ticknor

I think I may have a possible cause of why I can't get it
to work. I use SESSION variables in the page I am trying
to GET and that seems to trigger the error. Same exact
code below once with the session and once without. With
session it errors, without session it works. Does this
make sense? Simple sample code below:

<html>
<head>
<title>Test</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
</head>
<%
Dim family_id, tech_contact, tech_email,
admissions_contact, admissions_email
Dim school_id, school_logo, school_inputlogo
Dim body_bgcolor, body_textcolor, inputtable_bgcolor,
inputtable_bordercolor, inputtable_fontcolor

' if I switch the two lines below it changes whether it
works or not.

'tech_contact = "Tom Ticknor"
tech_contact = session("school_parms")(11)
tech_email = "(e-mail address removed)"
admissions_contact = "Donna Ticknor"
admissions_email = "(e-mail address removed)"

school_id = "1000"
school_inputlogo=""
body_background=""

body_bgcolor = "#FFFFFF"
body_textcolor = "#000000"
inputtable_bgcolor = "#FFFFFF"
inputtable_bordercolor = "#000000"
inputtable_fontcolor = "#000000"

family_id = "tomtest"


%>



<%
IF body_background<>"" THEN response.write "
background="& body_background
%>
<%
IF school_inputlogo<>"" THEN response.write "<p
align='center'><img border='0' src='" &
school_inputlogo&"'></p>"
%>

<div align="center">
<table width="600" border="0" cellspacing="0"
cellpadding="6">
<tr>
<td width="300"><strong><font face="Arial,
Helvetica, sans-serif">Family</font></strong><font
size="3" face="Arial, Helvetica, sans-serif"><strong>
ID: <font color="<%=inputtable_fontcolor%>"><%
=family_id%></font></strong></font></td>
<td width="300"><div align="right"><font size="3"
face="Arial, Helvetica, sans-
serif"><strong></strong></font></div></td>
</tr>
</table>
<br>
</div>
<div align="center">
<table width="600" border="2" cellspacing="0"
cellpadding="2" bordercolor="<%=inputtable_bordercolor%>"
style="border-collapse: collapse">
<tr>
<td> <table width="600" border="0" cellspacing="0"
cellpadding="6" bgcolor="<%=tableinput_bgcolor%>">
<tr bgcolor="<%=inputtable_bgcolor%>">
<td width="600"><div align="center">
" size="5">Thank
You!!! said:
" size="4" face="Arial, Helvetica, sans-serif"><br>
Remember to update your profile
regularly with current
information. said:
" size="4" face="Arial, Helvetica, sans-
serif"><strong><font size="3">Technical
questions:</font></strong> <font
size="3">
<a href="mailto:<%=tech_email%>"><%
=tech_contact%></a><br>
<strong>Admissions questions:</strong>
<a href="mailto:<%=admissions_email%>"><%
=admissions_contact%></a></font></font></p>
<p><font size="3" face="Arial, Helvetica,
sans-serif"><br>
</font>
<input type="button" value="Exit"
name="exit" onclick="self.close()"></p>
</div></td>
</tr>
</table></td>
</tr>
</table>
</div>
</body>
 
T

Tom Ticknor

In fact, it seems as though anything that is moderately
difficult like accessing a database doesn't work.
 
R

Ray at

The session variables will be empty, unless you're assigning them in
global.asa or something. The server is making the http request to the site
(which just happens to be this same server and site), so it will be a
totally different session from the one that the user loading this page you
posted is.

Ray at work
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top