((((((((((((((((( WEBREFERENCE UPDATE NEWSLETTER ))))))))))))))))) January 27, 2000
This newsletter sponsored by: Aquent Partners, iPrint.com and CityQuote.com __________________________________________________________________
Did the last recruiter you talked to think that Cold Fusion happened in a glass? And that DreamWeaver was just a song from the '70s? Work with an agency that gets the web. One that places more web professionals than any other agency in the world. Aquent Partners. http://www.aquent.com/partners/bannerform.html?bid=WR_1_27
Now with over 93400 subscribers!
http://www.webreference.com http://www.webreference.com/new/ http://www.webreference.com/new/submit.html New this week on WebReference.com and the Web:
1. CONTEST: Subscribe & Win! 2. FEATURED ARTICLE: Adding Features to Your ASP Site 3. NET NEWS: * Hackers Close Japanese Government Sites * W3C Issues XHTML 1.0 Recommendation * British ISPs Crack Down on Hate * Activists Charge DoubleClick Double Cross * Streaming Media Going Pay-Per-View * Super Bowl Coverage They Don't Want You to See
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >WebReference Open Publishing
Every Thursday the Update features a new article contributed by our readers through our Open Publishing Initiative. We encourage you to submit your own article ideas - Your words could be here, being read by thousands of other subscribers!
This week, writer Alan Mendelevich returns - You might remember Alan from his article "Ten Reasons to Develop in ASP," featured in our December 16, 1999 newsletter (which you can find archived at http://webreference.com/new/991216.html#feature). Alan's back with more tips on using ASP to implement three commonly requested site features.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1. CONTEST: Subscribe & Win!
Can't write? Still want to win? Don't worry, you can! Sign up for the Webreference newsletter, and get a chance to win a super software bundle from SoftQuad Software Inc. and Ulead Systems Inc. Prizes include HoTMetaL PRO 6.0, PhotoImpact 5, and COOL 3D 2.5. Already subscribed to the newsletter, but still want to win? No problem! Just enter your name in the "Signup & Win" form, and you'll be automatically entered.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2. FEATURED ARTICLE: Adding Features to Your ASP Site
During last few years the number of Web sites has grown dramatically, as well as the level of quality demanded from these sites. To succeed today, it's not enough to place some content on a static site. You need to have more and more features to attract new visitors and make them return again and again. Some of these features are not directly related to increasing the interest of your visitors and the level of traffic. Sometimes they are even not visible to the user, but are nonetheless crucial to getting your site's quality to the top.
In this article, I will try to show you how to implement some of today's most popular site features in ASP. Let's start with working examples of three commonly used features: a feedback form, a "recommend to a friend" feature and a 404 error reporter. The main function in the implementation of these three features is sending email from the ASP script. There are no built-in capabilities to send email from ASP, but there are lots of free and commercial components enabling you to do this. In this article, I'll use the JMail component available for free from http://www.dimac.net/. You may use any other component available on your host; it shouldn't be difficult to adapt these examples to work on your site.
One of the most important elements of a great site is the ability to satisfy user needs, and the easiest way to know what your users need and want is by getting their feedback. From my own experience, I know that simply displaying your contact information doesn't guarantee much feedback. There are a variety of reasons why people might not send you email even if they want to tell you something: they're not browsing your site from their own computer; they don't have their email software properly configured; an email message tends to require some formal things like greetings and more; they don't want to give you their email but still have something important to say... Having a feedback form solves most of these problems, enabling you to get more information from your users and build a better site.
Implementation of feedback form in ASP is quite easy: 1) create HTML form, 2) get fields, and 3) send email.
So let's start by creating basic HTML form (formatting skipped):
<FORM METHOD="POST" ACTION="sendmail.asp"> Name:<INPUT TYPE="TEXT" NAME="fromname" SIZE="32"><BR> Email:<INPUT TYPE="TEXT" NAME="fromaddr" SIZE="32"><BR> Subject:<INPUT TYPE="TEXT" NAME="subject" SIZE="50"><BR> Message:<TEXTAREA NAME="body" COLS="40" ROWS="6"></TEXTAREA><BR> <INPUT TYPE="SUBMIT" VALUE="Send"><INPUT TYPE="RESET" VALUE="Clear"> </FORM>
And now we will get the fields from that form and send them to our email:
<% Set jmail=Server.CreateObject("jmail.smtpmail") jmail.ServerAddress="mail.company.com" jmail.AddRecipient "firstname.lastname@example.org" jmail.Sender=Request.Form("fromaddr") jmail.SenderName=Request.Form("fromname") jmail.Subject=Request.Form("subject") jmail.Body=Request.Form("body") jmail.Execute %>
This is the simplest implementation of a feedback form. You may use it on your site as is. However, I would recommend customizing it to be more universal. You can make the form accept not only the name and email of the sender, subject and body, but also allow a choice of email address of the recipient (you) so you may use it from various parts of your site or on various sites. In this manner, you will be able to add a select box (dropdown) to your HTML form, so your visitor may choose the theme of the message and send the message to a specific responsible person. To be even more universal, you may want the script to redirect to a specific "thank you" page after processing.
Now our HTML form will look something like this:
<FORM METHOD="POST" ACTION="sendmail.asp"> <INPUT TYPE="HIDDEN" NAME="redir" VALUE="/index.html"> Name:<INPUT TYPE="TEXT" NAME="fromname" SIZE="32"><BR> Email:<INPUT TYPE="TEXT" NAME="fromaddr" SIZE="32"><BR> Theme: <SELECT NAME="toaddr" SIZE="1"> <OPTION VALUE="email@example.com">Product sales <OPTION VALUE="firstname.lastname@example.org">Bugs, dead links, etc. </SELECT><BR> Subject:<INPUT TYPE="TEXT" NAME="subject" SIZE="50"><BR> Message:<TEXTAREA NAME="body" COLS="40" ROWS="6"></TEXTAREA><BR> <INPUT TYPE="SUBMIT" VALUE="Send"><INPUT TYPE="RESET" VALUE="Clear"> </FORM>
And the processing script:
<% Set jmail=Server.CreateObject("jmail.smtpmail") jmail.ServerAddress="mail.company.com" jmail.AddRecipient Request.Form("toaddr") jmail.Sender=Request.Form("fromaddr") jmail.SenderName=Request.Form("fromname") jmail.Subject=Request.Form("subject") jmail.Body=Request.Form("body") jmail.Execute
Response.Redirect Request.Form("redir") %>
Note: Response.Redirect should be used before any content has been passed to the client.
========================================== Q: What's blue, great to have on your desk, and FREE? A: Handy stamps - ideal for return addresses! ========================================== Get your FREE self-inking stamp from iPrint.com today! Pay just $1.85 for shipping to U.S. addresses. Offer good for new customers of iPrint.com only. Click below to start: http://www.iPrint.com/132.html?ad=473Z3R132P
>Recommend To a Friend
So you've managed to build a really useful site. Now you need to start building traffic. One of the most powerful ways of attracting new visitors is a recommendation from someone they know and trust - a friend. But no matter how good your site is, people are often still too hurried (or lazy) to start their mailer and send some recommendations to their friends. This is where the "Recommend To a Friend" feature comes into the game. This feature allows your satisfied visitor to recommend your site to a friend without having to do something extraordinary and without leaving your site. He/she just fills in his/her name and email address, name and email address of the friend and click a button.
The implementation of this feature is not much different from the implementation of the feedback form. Just collect the needed information and send the email.
<FORM METHOD="POST" ACTION="recommend.asp"> Your name:<INPUT TYPE="TEXT" NAME="fromname" SIZE="32"><BR> Your email:<INPUT TYPE="TEXT" NAME="fromaddr" SIZE="32"><BR> Friends name:<INPUT TYPE="TEXT" NAME="toname" SIZE="32"><BR> Friends email:<INPUT TYPE="TEXT" NAME="toaddr" SIZE="32"><BR> <INPUT TYPE="SUBMIT" VALUE="Send"><INPUT TYPE="RESET" VALUE="Clear"> </FORM>
And the processing script (recommend.asp):
<% Set jmail=Server.CreateObject("jmail.smtpmail") jmail.ServerAddress="mail.company.com" jmail.AddRecipientEx Request.Form("toaddr"),Request.Form("toname") jmail.Sender=Request.Form("fromaddr") jmail.SenderName=Request.Form("fromname") jmail.Body="Dear " & Request.Form("toname") & CHR(10) & CHR(10) & _ Request.Form("fromname") & " recommends you to visit " &_ "Company site at http://www.company.com/. " &_ "We have lots of useful information." jmail.Execute %>
You may want to allow for additional text to be added by the visitor, but weigh the fact that this could potentially be used to send inappropriate mail from your Web site.
>404 Error Reporter
So things are starting to get rolling - your site has some traffic, you've submitted to lots of search engine and indexes, and there are finally other sites linking to yours. Inevitably, there will be some bad links among those. When a browser requests a non- existent page from your Web server, it receives 404 "page not found" error in response. Many servers can be configured to display a customized error page to be shown to your wayward visitor. You may use this page to let the visitor know that the page he requested doesn't exist and ask him to report the problem to the Webmaster of the site he came from. Now, how many of the visitors will actually do that? I would guess that the number is not much greater than 0.
You can analyze your logs to find out where are the bad requests coming from, but when you have a high-traffic site, downloading and analyzing logs can be a big pain. The easiest and fastest way is to make the error page to send you email with referrer and error information. To accomplish this, just add few lines of code to your custom 404 page (assuming that this page can include ASP):
<% Set jmail=Server.CreateObject("jmail.smtpmail") jmail.ServerAddress="mail.company.com" jmail.AddRecipient "email@example.com" jmail.Sender="firstname.lastname@example.org" jmail.Subject="Bad Link Report" jmail.Body="Bad link to our site at " & _ Request.ServerVariables("HTTP_REFERER") jmail.Execute %>
By adding the features described above, you can spice up your site and make it more powerful. It's important to remember, however, that it's not the latest and greatest bells and whistles make your site sell but high quality content. So while adding new tools and features to your site, don't forget about creating new interesting content - it's the main reason why users visit for the first time and why they return later.
Do you want to keep your best customers coming back for more? So they can't drag themselves away from your screen? Now they can track their own shares direct from your website. * * * live prices from stock markets around the world * * * * * * instant portfolio recalculations and stop loss alerts * * * Click http://www.cityquote.com (reseller program available)
About the Author:
Alan Mendelevich lives in Lithuania, and currently spends most of his time working on ArticleCentral.com. He and the rest of ArticleCentral "work virtually around the clock monitoring hundreds of Web development related sites and listing newest resources in an easy to use categorized catalog. Every article of significant importance to the Webmaster and Web developer community is listed here the very same day it is released."
You can reach Alan at: email@example.com or http://www.articlecentral.com.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3. NET NEWS: Hackers Close Japanese Government Sites, W3C Issues XHTML 1.0 Recommendation, British ISPs Crack Down on Hate, Activists Charge DoubleClick Double Cross, Streaming Media Going Pay-Per-View, Super Bowl Coverage They Don't Want You to See
>Hackers Close Japanese Government Sites
So far this week, hackers have made three successful attacks on the official Web sites of two Japanese government agencies, altering the agencies' homepages and possibly deleting government data. http://www.internetnews.com/intl-news/article/hackers.html InternetNews.com, 000127
>W3C Issues XHTML 1.0 Recommendation
The World Wide Web Consortium released the XHTML 1.0 specification as a W3C Recommendation. XHTML 1.0 should enable developers to create Web documents that still work with current HTML browsers, but that may be processed by XML-enabled software as well. Authors writing XHTML utilize the well-known elements of HTML 4, but with XML syntax, which promotes markup conformance. http://www.internetnews.com/wd-news/article/0,1087,10_295811,00.html InternetNews.com, 000126
>British ISPs Crack Down on Hate
Internet service providers in Britain announced new self- regulatory content policies aimed at removing racist material from the Internet. http://www.wired.com/news/politics/0,1283,33906,00.html Wired.com, 000125
>Activists Charge DoubleClick Double Cross
DoubleClick Inc. downplayed plans to start tracking individual users across the 11,000+ sites using their ad-tracking cookies, and direct-mail database information. The "profiling" will be accomplished by cross-referencing Web usage data with information available through their recently-purchased subsidiary, Abacus Direct Corp. Abacus is a direct-marketing company which maintains a database of names, addresses, telephone numbers and retail purchasing habits of 90% of American households. http://www.usatoday.com/life/cyber/tech/cth211.htm USAToday.com, 000125
>Streaming Media Going Pay-Per-View
Communications network provider InterVU and technology developer Wave Systems announced a partnership aimed at integrating technologies that better enable content providers to charge users for watching or listening to multimedia streams delivered via the Web. http://www.zdnet.com/zdnn/stories/news/0,4586,2427576,00.html ZDNet.com, 000126
>Super Bowl Coverage They Don't Want You to See
The folks at crime news Web site APBnews.com weren't going to sit back and let other news organizations thrive during the pre-Super Bowl media rush. They've compiled the rap sheets of the 13 players playing in Sunday's game who have had legal troubles and published them on their site. http://www.internetnews.com/rumblings/0,1145,81,00.html InternetNews.com, 000126
That's it for this week, see you next time.
Andrew King Managing Editor, WebReference.com firstname.lastname@example.org
Eric Cook Assistant Editor, WebReference.com email@example.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sponsoring the WebReference Update is a cost effective way to reach thousands of qualified buyers. Just ask Frank Fazio, Director of Inside Sales to find out how. Contact: (203)662-2997 or mailto:firstname.lastname@example.org ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Also on Internet.com .... http://www.Internet.com
Internet News Channel http://www.internet.com/sections/news.html Internet Stocks/VC Channel http://www.internet.com/sections/stocks.html Internet Technology Channel http://www.internet.com/sections/it.html Windows Internet Technology Channel http://www.internet.com/sections/win.html Linux/Open Source Channel http://www.internet.com/sections/linux.html Web Developer Channel http://www.internet.com/sections/webdev.html E-Commerce/Marketing http://www.internet.com/sections/marketing.html ISP Resources Channel http://www.internet.com/sections/isp.html Download Channel http://www.internet.com/sections/downloads.html Internet Resources Channel http://www.internet.com/sections/resources.html Internet List Channel http://www.internet.com/sections/lists.html International Channel http://www.internet.com/sections/international.html ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ To SUBSCRIBE to the WEBREFERENCE-UPDATE: 1. email@example.com or firstname.lastname@example.org
To UN-SUBSCRIBE from WEBREFERENCE-UPDATE do NOT reply to this message, instead: 1. email@example.com or firstname.lastname@example.org
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Copyright (c) 2000 Jupitermedia Corp. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ WEBREFERENCE-UPDATE is powered by Lyris(R) http://www.lyris.com ---