Click to See Complete Forum and Search --> : binding data fields to a drop-down list.


mcmcom
November 25th, 2003, 01:02 PM
I don't know how to bind data fields to a drop down list, or to radio buttons for that matter. I can bind to span elements, text boxes and stuff like that, but I can't figure out how to bind to a drop-down list. Here is the code im using:

<html>

<head>
<title>Pop Quiz</title>

<!-- This object element inserts an ActiveX control -->
<!-- for handling and parsing our data. The PARAM -->
<!-- tags give the control starting parameters -->
<!-- such as URL. -->
<object id = "Quiz"
classid = "CLSID:333C7BC4-460F-11D0-BC04-0080C7055A83">
<param name = "DataURL" value =
"QuizQuestions.txt" />
<param name = "UseHeader" value = "TRUE" />
<param name = "TextQualifier" value = "@" />
<param name = "FieldDelim" value = "|" />
</object>
<script type = "text/javascript">

<!--
var recordSet = Quiz.recordset;


function forward()
{
recordSet.MoveNext();

if ( recordSet.EOF )
recordSet.MoveFirst();

}
// -->
</script>
</head>

<body>

<h2><center>Quiz</center></h2>

<form method="POST">
<p><font size="2" color="#000080">Enter your Name: <br>
<input type="text" name="fldName" size="36"></font></p>
<p><font size="2" color="#000080">Enter your Email Address:<br>
<input type="text" name="fldEmail" size="36"></font></p>
<p><font size="2" color="#000080">Enter your Student ID #:<br>
<input type="text" name="fldStudentID" size="25"></font></p>
<p><strong>Quiz Question: </strong><br>
<span id = "Question" style = "font-family: monospace"
datasrc = "#Quiz" datafld = "Question"></span><br />

<p><strong>Select Answer: </strong><br>
<span id = "Answers" style = "font-family: monospace"
datasrc = "#Quiz" datafld = "Answer1"></span><br />


THIS CODE IS WHAT I AM HAVING TROUBLE WITH
<p><select size="1" name="D1" datasrc="#Quiz">
<option datasrc="#Quiz" datfld="Answer1"></option>

</select>
THANKS IN ADVANCE