i have parameters in a html page and i read them into my java file using
for(i=1;i<=iMaxQuest;i++)
{
gQuestionsAcross = getParameter("A" + i);
if(gQuestionsAcross == null) gQuestionsAcross = "";
gQuestionsDown = getParameter("D" + i);
if(gQuestionsDown == null)
gQuestionsDown = "";
}
imaxQuest is a variable
gQuestionsAcross and gQuestionsDown are arrays of the parameters with the name A or D followed by a letter respectively.
when i try to access the array elements in order to print them into a text area the applet loads but instead of just printing the parameter values it keeps running and repeatly prints the values all the time, below is the code that i am using at the moment that does this. it seems as if the loop keeps running even after the max value of the counter has been reached. i have this loop in paint and the above code is in init.
for(int i=1;i<=gQuestionsAcross[].length-1;i++){
taQuestionArea.append(gQuestionsAcross);
}
for(i=1;i<=iMaxQuest;i++)
{
gQuestionsAcross = getParameter("A" + i);
if(gQuestionsAcross == null) gQuestionsAcross = "";
gQuestionsDown = getParameter("D" + i);
if(gQuestionsDown == null)
gQuestionsDown = "";
}
imaxQuest is a variable
gQuestionsAcross and gQuestionsDown are arrays of the parameters with the name A or D followed by a letter respectively.
when i try to access the array elements in order to print them into a text area the applet loads but instead of just printing the parameter values it keeps running and repeatly prints the values all the time, below is the code that i am using at the moment that does this. it seems as if the loop keeps running even after the max value of the counter has been reached. i have this loop in paint and the above code is in init.
for(int i=1;i<=gQuestionsAcross[].length-1;i++){
taQuestionArea.append(gQuestionsAcross);
}