Develop a WEB survey (voting) system using ASP Technology (2)

Source: Internet
Author: User
2. Create and maintain the survey project
Author: Cactus studio
    
This section describes how to implement the project creation and maintenance functions.
    
The start page of the creation and maintenance survey object is startup.html, which is used to set the frame structures used by pages such as PollMaker. asp and ItemMaker. asp (three frames are arranged from top to bottom ). The start page uses only the background color. Startmsg.html provides the prompt information displayed at the bottom frame during startup.
    
Both PollMaker. asp and ItemMaker. asp contain ASP scripts running on the server and browser scripts (and creation) to support client operations. The script running on the server is written by VBScript, while the client script is JavaScript, which enables it to run on Netscape Navigator and is suitable for IE.
    
PollMaker. asp: Find the MSysObjects system table of the Poll database to obtain the name of the defined survey project. Therefore, ASP applications must have the permission to read the table. In Access97, you can set the system object visibility by selecting "tools/options" in the menu, and then setting it under "Tools/Security/user and group permissions. In the code appended to this article, Poll. mdb has set this permission. If you want to implement this survey system on different RDBMS, this part of code must be rewritten to adapt it to the system table structure on the target database.
    
To display the names of these defined survey items to the drop-down list box, you must first remove the "S _" prefix from the table name of the S _ table, format these strings into the <OPTION> string of the <SELECT> element:
    

<Select name = "PollName">
<Option value = "StartPoll" SELECTED> NEW POLL
<%
'Get the name of the currently defined survey project
Set objConn = Server. CreateObject ("ADODB. Connection ")
ObjConn. Open "poll"
Set objRS = _
ObjConn. Execute ("SELECT Name FROM MSysObjects "&_
"WHERE Type = 1 AND Name LIKE's _ % 'Order BY Name ")
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.