Demonstrations
survey.asp
The original voting site consists of only three pages: signin.asp, survey.asp, and exit.asp. We decided early on that we
wanted a very concise and simple layout - in terms of usability, a survey requires simplicity. We also wanted a clear welcome page,
survey page, and leaving page. A break-down of the pages and how they work:
signin.asp: The sign-in page has two purposes. First, it provides a starting point for the survey that greets
and prepares the voter. Second, it incoporates the main security measure for the voting site -- password protection.
datafill.asp entered 500 random 5-digit codes into the database (table ELStudents). These
were printed on business cards and distributed to the voters. Sign-in presents a text-field that prompts voters to enter
their code. On submitting, the code runs through ELStudents until it finds a match. If it does, that code is removed using
an SQL delete statement, and the voter is redirected to the survey. If it is not found in the database, the voter is not
redirected. The survey's design prevents admission without passing through sign-in. This simple design prevents re-voting.
View the Source
survey.asp: the main survey page cannot be accessed directly, requiring redirection from the sign-in page. Survey
determines whether or not this is the case by checking for the presence of a hidden variable passed by sign-in. If it is note
found, the user is redirected to sign-in. If it is found, the survey is generated. A VBScript loops print each
survey question from the database (table ELQuestions), and another loop prints each answer for that question (table ELAnswers).
The user selects answers to questions of gender, grade, and home school [their default, non-magnet school], and
their presidential choice, and submits. A JavaScript function then loops through the questions, making sure that all questions are answered.
The answers are submitted to an alert box, to be reviewed by the voter. If these choices are acceptable, the form is submitted, and ASP
submits the answers through four seperate insert statements. Each question answer is inserted into its own question-sorted
table (YearResponse, HoodResponse, SexResponse, PresidentResponse), to await processing in the results phase.
View the Source
exit.asp: The simplest of the survey pages, exit is a confirmation and conclusion page that thanks the voter and
prompts them to return to the site later for detailed results. It is straight HTML.
View the Source