I've got a piece of code here, that was initially responsible for getting stuff out of a database, and into an array.
It used to do that fine, but after that, it needed to add another optional field.
However, when i try to run the code with the lines i commented out here, it gives me an LOOP without DO error
function switchAlgemeen()
{
var algemeen = new Array();
var JS;
<%
sql1 = "SELECT DISTINCT * FROM HSE_TRA_risico_nieuw WHERE formtype = 'algemeen'"
result = 0
SET RS = Conn.Execute(sql1)
RS.MoveFirst
Do While Not RS.EOF
//if RS("fieldsRequired") > 0 THEN
//Js = RS("JStrigger")
//if RS("field1") <> " " THEN
//%>
//algemeen[<%=result%>] = '<input type="checkbox" id="<%=RS("risicoID")%> <%if not(isNull(JS)) THEN%> onclick = "<%=js%>" /> <%=RS("risico")%> <br />'
//algemeen[<%=result%>] = algemeen[<%=result%>] + '<div style="display:none;" id="<%=RS("risicoID")%>div">text <%=RS("field1")%> </div><br />';
//<%
//END IF
//ELSE
//(nothing here yet)
//End If
//%> algemeen[<%=result%>] = '<input type="checkbox" id="<%=RS("risicoID")%> /> <%=RS("risico")%> <br />';<%
result = result + 1
RS.MoveNext
LOOP
%>
}