Hi there
Most of the code here is Javascript, but the problem-code is infact the ASP code in it..
i've tried to print out the value of postRs("postnr") and postRs("poststed") for each iteration , but it's not doing what should be done :
<%postRs.Movenext%>..
Is there another way to do what i'm trying to do ?
-----------------SQL QUERIES-----------------------
<%
Dim postRs
objCommand.CommandText = "SELECT postnr, poststed from POSTINFO"
set postRs = objCommand.Execute
'<finn antall poststed og nummer>
Dim ant
objCommand.CommandText = "SELECT count(postnr) from POSTINFO"
ant=objCommand.Execute
%>
---------END SQL QUERIES---------------------
--------------------
JS WITH ASP-----------------
<script language=JavaScript>
var nrTab = new Array(<%=ant(0)%>);
var stedTab = new Array(<%=ant(0)%>);
var iCount = 0;
<%postRs.MoveFirst%>
while (iCount < <%=ant(0)%>)
{
nrTab[iCount] = '<%=postRs("postnr")%>';
stedTab[iCount] = '<%=postRs("poststed")%>';
<%postRs.MoveNext%>
iCount++;
}
alert(stedTab[iCount]);
</script>