|
The email is not plugged into the main site just
yet.... putting the wraps on the signup and help pages and expect to launch it
next week.
Mike
Below is the LOADJS.ASP code which I use to format
and send back any standard html file.
NOTE: the ReturnTextFileAsString function is not
included... it does exactly that...opens a textfile, loads it into a string,
closes the text file, and returns the string...
-----------------------------------------------------------------------------------------------------
<% response.buffer=TRUE response.expires=0
%> <!--� Copyright Starphire.commerce 1999, All Rights
Reserved-->
<%
' get the querystring jsfn=xxxxx.html
htmlfilename =
trim(request.querystring("jsfn")) if htmlfilename <> ""
then
' confirm that the file exists
before attempting to open and read it htmlfilepath =
server.mappath("/misc/javascript/" & htmlfilename)
if fileexists(htmlfilepath)
then response.write "document.writeln(""" &
filterforjavascript(ReturnTextFileAsString(htmlfilepath)) &
""");" else response.write "file does not
exist" end if end if
' this function replaces CR/LF's with a space and
all double quotes with a single quote function
filterforjavascript(htmlstr)
filterforjavascript =
replace(replace(htmlstr,VbCrLf," "), """", "'")
end function
%>
----- Original Message -----
Sent: Wednesday, December 01, 1999 10:53
AM
Subject: RE: [IMail Forum] Includes/ASP
in Web Templates
Congratulations. This is very clever, and works
nicely. I also like the website, and spent too much time looking at the
fishing "stuff". I need to go back to look at more. One question, how do you
return to the email screen after you leave it? I also like the changes to the
look and feel of the templates. I would still be interested in seeing the .ASP
that does the loading of the frames.
Mark
If you would like to see the resulting web
templates I have set up a demo account for everyone to use... I will keep it
open for a few days only..
username = demo
password = demo
The Header, SideBar, and Footer on each page
are generated using the Javascript method described below... All we have to
do to change all of them is make one change to the HTML file which the
javascript loads and all the web templates get the new sidebar.
I would appreciate any feedback or problems
anyone encounters...
Mike Murdock
CIO
FishingLife.com
----- Original Message -----
Sent: Wednesday, December 01, 1999
10:11 AM
Subject: Re: [IMail Forum]
Includes/ASP in Web Templates
ASP's are usually pretty small, would anyone
object if he posted it to the list? I would love to see this.
Great innovative thinking Mark! Bravo!
-V
----- Original Message -----
Sent: Wednesday, December 01, 1999
9:45 AM
Subject: RE: [IMail Forum]
Includes/ASP in Web Templates
Please post it, I am interested. If you need to
attach and email it directly, please send it to mailto:[EMAIL PROTECTED].
Mark
Topic: How to mix ASP and Static Web
Messaging Templates to produce dynamic content in Imail Web
Messaging.
A while back I posted a query on how to
get common HTML included in all the web messaging templates without
having to cut and paste into each one. This has to be a common problem
for anyone doing a serious makeover of the look-and-feel of the web
interface. The problem for us was that we wanted to include a common
header, sidebar, and footer on each page. These might change from time
to time and the prospect of having to edit the 50 or so web templates
each time was giving me a huge headache.
I tried using the mailwelc.txt file but
it's size limitation and other quirkyness made this unworkable...
Additionally many of you have been
discussing the desire to use ASP with Imail Web Messaging. While not
the ideal solution (I would much prefer an Object API into the Imail
engine directly) I have come up with a
pretty good solution for doing dynamic includes and executing ASP
within the web templates using JavaScript..
The solution is to include the following
JavaScript in each web template..
<script LANGUAGE="JavaScript"
SRC="http://www.yourdomain.com/asp/loadjs.asp?jsfn=top.html"></script>
The loadjs.asp could be any asp you want
to execute that puts out HTML.. The catch is that the ASP must
send back properly formatted Javascript. So all you have to do is
..
Response.Write
"document.writeln(""<h1>This is the HTML to send
back</h1>"");"
Using this method your ASP can go do what
ever it needs to and send back the results to the browser. It works
great for including dynamic ads, rotating content or any other common
code you want on every template page.
The loadjs.asp script I developed is
designed to take a querystring "jsfn=file.html", load that html,
format it into a proper javascript document.writeln command and
send it back to the browser.
If anyone is interested I would be happy
to post the jsfn.asp code for all to use...
Mike Murdock
CIO
FishingLife.com
|