Hi i am buildding a WEb based Questionnaire and i am trying to receive text from a jsp page i have created and print it out as XML. I have a createHeader.jsp file that asks for the number of questions you want to create so when i click it it take me to createQuestions.jsp where i can enter text. ie Enter a Question, 4 choices and the Right anwser. When i submit it takes me to writeXML.jsp which write it as an XML file...
} bw.close(); %> So this gets the parameter names of the TEXTAREA from the createQuestion.jsp The problem is that it wites as XML for just the first set(ie Question, the 4 Choices and the Answer) I know this code does what it is doing but can anyone help me so i it will write it as XML for all the Questins i want to create Thanx
prabhat kumar
Ranch Hand
Joined: Apr 11, 2001
Posts: 114
posted
0
does all the question elements have the same name? like parameter questionText?? then u can do something like this
hope it may help
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12268
1
posted
0
Incidently, I think that an empty Text area will return an empty string, not a null. Bill
midan myaa
Greenhorn
Joined: Nov 26, 2001
Posts: 8
posted
0
Thanx prabhan but the parameters have different names as i want to be able to conert to XML every thing i enter into the textArea......This form is supposed to display a number of TextArea's for The Question , choices and answer, and i want to get the values for what ever number of set it is ie whether there are 2 Questions with 2 TextAreas for Question1 and 2 and 8 TextAreas for the choices --------------- Question 1 ---------------- Enter Question: ---------------- choice1 ----------------- choice2 --------------- choice3 ----------------- choice4 --------------- CorrectAnswer ----------------- Question 2 ---------------- Enter Question: ---------------- choice1 ----------------- choice2 --------------- choice3 ----------------- choice4 --------------- CorrectAnswer --------------
<%count++; %> <% } %> <tr> <td align="RIGHT"><input type="submit" name="next" value="NEXT"> </td></tr> I hope you the the picture of what i wan tot do and you can help.......thank