A Personalized "Thank You" Page With Any Form

Digg!                                               
(originally published in the Possibilities ezine)

Not everybody is lucky enough to have Master Form V4 installed on their web sites. And some people are required to use proprietary form handling software for e-commerce or other site features or services from certain vendors.

This article will show how to emulate one of the cool features that come with the standard Master Form V4, a personalized "thank you" page.

The method described here is accomplished with JavaScript and cookies.

When your site visitor uses a form, the "thank you" page can be personalized. The personalization uses information the site visitor provided on the form.

When the form is submitted, JavaScript is used to store certain form information in a cookie.

Later, when the "thank you" page is loaded into the user's browser, JavaScript is used to retrieve the information from the cookie. Still using JavaScript, some or all of that information is inserted at pre-selected places on the web page.

The "thank you" page is personalized whenever it is loaded into the browser, whether immediately after the form is submitted or later on.

For example, the form might be submitted to an autoresponder or payment gateway. Later, the browser lands on the "thank you" page, which is then personalized.

In fact, other pages can use the same JavaScript as the "thank you" page does. If the site visitor provided a name on a form, for example, every page of the web site could be personalized with that name.

The Instructions

The web page with the form uses different JavaScript than the "thank you" page uses. Thus, two pages need JavaScript installed.

If you wish to personalize other pages in addition to (or instead of) the "thank you" page, follow the "thank you" page instructions for those pages.

Instructions for the web page with the form —

To work with this system, form field names must begin with a letter and be composed only of letters, numbers, and underscore characters.

Put this JavaScript somewhere above the form. It may be in the HEAD area or the BODY area.

 

Verify the form has a name. A form name would be specified with the name="____" attribute in the FORM tag. Example: name="MyForm"

In the above JavaScript, at the place indicated, specify the form name.

Also in the above JavaScript, at the place indicated, specify the cookie name. This name will be used to store the cookie and must be identical to the cookie name in the JavaScript at the "Thank You" page, once that JavaScript is installed.

Now, do one of these two things (do only one, either one, but not both) with the web page form:

OR,

Only fields with a name can be cookied. Of fields with a name, these will not be cookied:

Here is an example form, for reference.

 

Instructions for the personalized "thank you" (or other) pages —

Put this JavaScript with the ReadCookieValues() function somewhere above the text to be personalized. It may be in the HEAD area or the BODY area.

 

In the above JavaScript, where indicated, specify the cookie name. This name must be identical to the cookie name in the JavaScript on the form web page.

Use the PrintPersonalizednfo() function to print a value wherever you want it printed.

PrintPersonalizednfo() requires at least one parameter and may have up to three parameters, in this order:

The field name must always be provided.

The default text is optional, but must be provided (null is okay) if any appending characters are provided.

Appending characters are optional.

Here are some examples —

Here is an example use of function PrintPersonalizednfo(). Notice that NOSCRIPT tags are in place, for this example, to accomodate browsers without JavaScript.

 

Here are a few more examples.

 

Will Bontrager
2006

Will Bontrager
Software Programmer
http://willmaster.com

 

Your Opinion Matters!

Please, tell me what you think about this article. I promise the page will not reload...it’s quick and easy

 

(find out HOW this is done HERE)

 

WebDesigners-Directory 

 

ROR  

 

custom_thankyou_page_with_any_formdlperry.com

design     develop    enhance     manage     software

dlperry.com

HOME

XML Content FeedsRSS Content FeedsROR Search Engine Feeds 

[website services] [site enhancements] [professional cgi] [contact us] [website resources] [Free Info Center] [business resources]
[dlperry.com] [internet website resources] [custom_thankyou_page_with_any_form]

H O M E

About dlperry.com:
   Sitemaps
   Contact Info
   Designers Bio
   References
        -->portfolio
        -->testimonials
   Legal
        -->orders & payments
        -->privacy

Website Services:
   Website Design
        -->intuitive design?
        -->the design process
        -->design guide
        -->cost estimator
   RSS Feeds
   Site Management
   Website Promotion
   in Google in days
        -->boost your site traffic.
        -->Google on Sitemaps.
           PageRank and more.

Site Enhancements:
   Autoresponders
   Custom 404
   Forms
   Syndicators
   Free scripts

Professional CGI:
   B-mailer™
   ClickWatch
   FormJobber
   Grab-n-Code

Business Resources:
   Finance
   Data Management
   Directories & Forums
   Programming
   Software
   Web Development
   Misc. Tools

Internet Resources:
   Bontragers’ weekly
   Possibilities ezine
   FAQ
        -->cgi faq
        -->design
        -->domain names
        -->general
   Free Info Center
   Free-Wares
   Website Resources:
        -->How To’s:
        -->Tips:
        -->Tools:
   SpiderSite
   More -->

Intuitive website design, enhancements, functionality for websites, site management and web site promotion, RSS, ROR, SEO


 

Resources for Website Managers and Designers

 

 

Intuitive InSite

~ Blog-Etiquette ~

Google Sitemaps Beta
"We use Google Sitemaps to inform Google's crawler about all your pages and to help people discover more of your web pages."

Add to Google 

I <3 SEOmoz 

 

Master Form V4