Developers
AvantGo Channel Developer Guide

TOC PREV NEXT INDEX


Email and zip code auto-fill

You can use information from the AvantGo service to provide advanced personalization for your users. Use the email and zip code auto-fill feature and provide your users with forms that have their AvantGo email address and zip code information pre-populated. This makes the user's job easier and helps to eliminate data entry errors. You benefit with accurate and important information that you can use to custom-tailor information for your users.

Before using this feature, think about the following restrictions:

  • You must contact your AvantGo sales representative before going live with this form.
  • Users must agree to the use of their email addresses and zip codes. Accomplish this by including a SUBMIT button on your form.
  • No Javascript is allowed to run on the page containing the form. This is to prevent possible form submits (for example, in OnLoad() or onUnload() code) without the user's explicit permission.

To illustrate how this feature works, I have created a simple sample form. For the full source code, see Email and zip code auto-fill example.

First, you will notice that I have included a Cache-Control:private header. I did not have to include this header because use of these two auto-fill elements will automatically imply the same caching behavior as if the Cache-Control:private directive were present in the HTTP response header from the origin server, but I did for the sake of consistency.

The fun stuff is further down the page:

# Use INPUT TYPE="AGEMAIL" to pre-populate field

# with user's email address.

  

Confirm your Email address:

<INPUT TYPE="AGEMAIL" NAME="email" SIZE="20">

  

# Use INPUT TYPE="AGZIP" to pre-populate field

# with user's zip code information.

  

Confirm your zip code:

<INPUT TYPE="AGZIP" NAME="zip" SIZE="8">

  

The two new INPUT elements behave exactly as though their type were TEXT, with the following exceptions:

Any VALUE attributes are ignored, and the VALUE is automatically generated with the user's email address or zip code.

The minimum value for the SIZE attribute is 20 for AGEMAIL and 5 for AGZIP.

The form submit automatically will have the trashResponse behavior, even though this normally is available only for form submits with JavaScript.

When users online browse to the page containing this form, for example, from the Open Page function in the client or from their My Wireless page, auto-fill will not be activated.

And here is how our form will appear to the user:

Figure C-1 Top of form using auto-fill of email address and zip code

If we scroll down the page we notice the Submit button (in this case VALUE="OK"):

Figure C-2 Bottom of form using auto-fill

 



TOC PREV NEXT INDEX