Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Multi Forms, 1 Script, Text INI Files
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Multi Forms, 1 Script, Text INI Files

 Post Reply Post Reply
Author
rjmthezonenet View Drop Down
Newbie
Newbie
Avatar

Joined: 12 September 2003
Location: Canada
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote rjmthezonenet Quote  Post ReplyReply Direct Link To This Post Topic: Multi Forms, 1 Script, Text INI Files
    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!
Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post Posted: 12 September 2003 at 3:47pm
use xml, you can store stuff there to be read in dynamically.
Back to Top
rjmthezonenet View Drop Down
Newbie
Newbie
Avatar

Joined: 12 September 2003
Location: Canada
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote rjmthezonenet Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post Posted: 15 September 2003 at 3:24pm
Back to Top
rjmthezonenet View Drop Down
Newbie
Newbie
Avatar

Joined: 12 September 2003
Location: Canada
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote rjmthezonenet Quote  Post ReplyReply Direct Link To This Post 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!
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.