Print Page | Close Window

Multi Forms, 1 Script, Text INI Files

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=5707
Printed Date: 30 March 2026 at 11:40pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Multi Forms, 1 Script, Text INI Files
Posted By: rjmthezonenet
Subject: Multi Forms, 1 Script, Text INI Files
Date Posted: 12 September 2003 at 12:10pm
Hi,

I'm scratching my head on how to do this one. You're advice is very much appreciated.

How would you write a single script that processes many forms? Specifically, a script that: (1) reads a text file to learn what form fields will be used, (2) generate the form, (3) collects the data, (4) tracks the pages in a session, and (5) processes the data.

A good example would be a script for on-line exams. A single script could run multiple exams by reading exam1.ini , exam2.ini, etc.

Oh, I cannot use ODBC to an Access database. The individual exams much be configuration files (CSV, .ini, etc).

Thanks!

-------------
A core dump is your computer's way of saying "Here's what's on my mind, what's on yours?"



Replies:
Posted By: michael
Date Posted: 12 September 2003 at 3:47pm
use xml, you can store stuff there to be read in dynamically.

-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: rjmthezonenet
Date Posted: 15 September 2003 at 12:35pm
Hey,

Your idea sounds promising. It appears possible to use XML files to describe the layout of multi-page forms. For example:

(Where section id=x is used to seperate pages.)

<?xml version="1.0" encoding="ISO-8859-1"?>
<form>
    <section id="1">
        <question>
             <type>textInput</type>
             <name>organization</name>
        </question>
        <question>
             <type>textInput</type>
             <name>organization</name>
        </question>
    <section id="2">
        <question>
             <type>textInput</type>
             <name>organization</name>
        </question>
</form>

I searched all dam day for documentation on Microsoft.XMLDOM and the best I found was this:

Set objXML = Server.CreateObject("Microsoft.XMLDOM")
objXML.Load(Server.MapPath("myXMLFile.xml"))
For Each objChild in objXML.documentElement.childNodes
    response.Write objChild.NodeName & " - "    
    response.Write objChild.Text & "<br>"
Next

Everything on Microsoft's site is .NET@ I can't find the slightest bit of documentaiton on working through an XML file. This is frustrating... all I need is a manual. This is impossible to do without documentation.


Thanks for the starter tip. I'm still looking.

Rob

-------------
A core dump is your computer's way of saying "Here's what's on my mind, what's on yours?"


Posted By: michael
Date Posted: 15 September 2003 at 3:24pm
http://www.w3schools.com/xml/default.asp - http://www.w3schools.com/xml/default.asp
http://www.siteexperts.com/tips/xml/ts02/page1.asp - http://www.siteexperts.com/tips/xml/ts02/page1.asp
or a ton of tutorials
http://www.aspin.com/home/tutorial/xml - http://www.aspin.com/home/tutorial/xml

-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: rjmthezonenet
Date Posted: 18 September 2003 at 12:56pm
Thanks for the links. That information helped me get a basic XML file together that contains all my forms as well as all the questions in each page of those forms. Now my script can present a list of forms, work through several pages of completing a form (thanks to sessions), and build a completed PDF.

I still find the Microsoft.XMLDOM way of walking an XML file cumbersome. What else can I do besides FirstChild, ChildNodes and text? How can I specify an XML node like this: /forms/form/sections/section/question ? Can I find a node by attribute or value? Can you recommend a way to drop nodes into an array?

A complete list of XMLDOM objects and their properties, and values would be a definite asset. Picking through web pages for random samples is too time consuming (2 days so far). Do you have a book suggestion?

Thanks!

-------------
A core dump is your computer's way of saying "Here's what's on my mind, what's on yours?"



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net