Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with !dataSet.EOF in IE5.5

Status
Not open for further replies.

ale77

Programmer
Joined
Jul 18, 2003
Messages
38
Location
US
Hello. I made a form, and it reads the data from a file. For that I'm using tabular data contol and it was running OK, but when I ran it in another machine that has Internet Explorer 5.5 it did not run. I read that Tabular Data Control can be used from version 4. Does anyone know how can I solve the problem??????
The error message is this:
Operation is not allowed when the object is closed

This is the code of the program:
function fact(){

var dataSet = data1.recordset; //Get the complete data record set

// Creates the html form and tables. THE ACTION OPTIONS IS SENDING THE RESULTS TO AN EMAIL ADDRESS
document.write('<FORM NAME=&quot;questions&quot; onSubmit=&quot;return valForm(document.questions);&quot; METHOD=&quot;POST&quot; ACTION=&quot;mailto:ramakrishna@streetone.com&quot; TARGET=&quot;questionspoints.html&quot;>');
document.write('<td width=&quot;25&quot; bgColor=#595959><img src=&quot;login_files/tom.gif&quot; border=&quot;0&quot; width=&quot;25&quot; height=&quot;1&quot;></td>');
document.write('<td valign=top bgColor=#595959>');
document.write('<TABLE cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; border=&quot;0&quot; width=&quot;470&quot; align=&quot;left&quot; valign=&quot;top&quot; bgcolor=&quot;E4E4E4&quot;>');

while (!dataSet.EOF)
{
if (dataSet.Fields(0).value == que) //compares if the field(0) is in a question 1=1 or ''=1
{
que++; // increments when is a question in field0, controls how many questions are in the questionnaire
opt=1; // Restarts the opt counter. Opt controls the option number

if ( ((que-1) == 6) && (opt == 1) ) //When it is in question 6, it will create another table to divide the questionnaire in two tables.
{
document.write('</table></td> <td valign=top bgColor=#595959 >');
document.write('<TABLE cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; border=&quot;0&quot; width=&quot;470&quot; align=&quot;right&quot; valign=&quot;top&quot; bgcolor=&quot;E4E4E4&quot;>');
}

// Prints the QUESTION
document.write('<TR bgColor=#FFFFFF valign=&quot;top&quot;>');
document.write('<td width=&quot;20&quot;><b> Q'+(que-1)+'. </td>');
document.write('<td colspan=2><b> '+dataSet.Fields(1).value+'</b></td>'); // Writes the question
document.write('</TR>');
}
else //prints the radio buttoms and options
{
document.write('<tr bgcolor=&quot;E4E4E4&quot;>');
document.write('<Td width=5>');
//O AND P are used to control the input name: q1, q2, q3
o=&quot;q&quot;+(que-1); //o = &quot;q&quot;1, &quot;q&quot;2, &quot;q&quot;3, etc.
p=o.toString(); //p = &quot;q1&quot;, &quot;q2&quot;, &quot;q3&quot;, etc.

points[que-1][opt]=parseInt(dataSet.Fields(3).value);

document.write('<input type=radio name=&quot;'+p+'&quot; value=&quot;'+opt+'&quot;> ');

document.write('</td>');
if ( dataSet.Fields(4).value == '' )
{document.write('<td colspan=2>'+dataSet.Fields(2).value+'</td></tr>');}
else {
document.write('<td>'+dataSet.Fields(2).value+'</td>');
document.write('<td><font color=#595959>'+dataSet.Fields(4).value+'</font></td></tr>');
}
data1.recordset.movenext();
opt++;
}
}
document.write('</table></td>');
document.write('<td width=&quot;25&quot; bgColor=#595959><img src=&quot;login_files/tom.gif&quot; border=&quot;0&quot; width=&quot;25&quot; height=&quot;1&quot;></td>');
document.write('<tr bgColor=#595959 align=&quot;center&quot;> <td colspan=4><br><input type=submit value=&quot;Submit Questionnaire&quot;><br><br></td></tr>');
document.write('</FORM>');

}
</SCRIPT>
<SCRIPT LANGUAGE=&quot;JavaScript&quot; SRC=&quot;../js/evaluate.js&quot;></SCRIPT>
I hope someone knows something about this.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top