<%@ LANGUAGE=VBScript %> <%Response.Buffer=TRUE '** WHO AM I ** -- ActivoteAmerica by JKAG 10/4/04 ' This page shows info for one state, ' first the general statewide voter registration info ' then the list of towns with links to each one's town.asp '**WEB DESIGN VARIABLES** 'Set the Width of the tables with this variable (by percentage) Dim TableWidth TableWidth=75 'Parameter explanation ' state=the 2-letter state code %> <% 'Check for state, and bounce back if no string is given If Request.QueryString("State") = "" Then Response.Write "No state query" ' Response.Redirect("resources.asp") End If dim upper_abbr upper_abbr = UCASE (Request.QueryString("State") ) Dim DB_state_Conn, rs_state, SQLText 'Intialize the Database connection Set DB_state_Conn=Server.CreateObject("ADODB.Connection") DB_state_Conn.Open "ava_dsn" Set rs_state=Server.CreateObject("ADODB.Recordset") SQLText = "SELECT * FROM state_info WHERE Abbr = '" & upper_abbr & "' " rs_state.Open SQLText, DB_state_Conn If rs_state.EOF Then 'Message not found, bounce back Response.Write "No such state :" & upper_abbr ' Response.Redirect("resources.asp") End If %> <%=rs_state("Abbr")%> Resources <% dim the_office ''' For officeholder link in ava_header.inc the_office = upper_abbr %> <%=rs_state("Reg_info")%>

<%=rs_state("State")%> Voter Registration Information:
<%=rs_state("State")%> Local Election Offices:

<% dim state_name '' Save for town state_name = rs_state("State") 'Close Database Connections rs_state.Close DB_state_Conn.Close Set rs_state = Nothing Set DB_state_Conn = Nothing ''' Start the town list Dim DB_town_Conn, rs_town 'Intialize the Database connection Set DB_town_Conn=Server.CreateObject("ADODB.Connection") DB_town_Conn.Open "ava_dsn" Set rs_town=Server.CreateObject("ADODB.Recordset") SQLText = "SELECT * FROM town_info WHERE STATE = '" & upper_abbr & "' ORDER BY TOWN " rs_town.Open SQLText, DB_town_Conn %> <% While Not(rs_town.EOF) ''' Each line: Show town and its link %>
"> <%=rs_town("TOWN")%> <% rs_town.MoveNext Wend %>


Any updates on the above? Please contact us and say so!


<% 'Close Database Connections rs_town.Close DB_town_Conn.Close Set rs_town = Nothing Set DB_town_Conn = Nothing %>