Hello
i am trying to code a survey.
there are questions and answers.The answers are radioboxes. if answer "no" is selected,the partial page which includes that question part, should be refreshed and a more question is needed to asked. How can handle this partial refresh stuff in html?

 <html>
 <form>
 Response.Write("<b> question 1 </b><br>
  yes   <input type=radio name=q25 value=0><br>
   no  <input type=radio name=q25 value=1 ><br>")

  if (q25==1)
        Response.Write("question 2")
         Response.Write("yes   <input type=radio name=q255 value=0><br>
                         no  <input type=radio name=q255 value=1 ><br>")
  </form>
  </html>

Edited 1 Year Ago by thebuffy: misword

Is the data for the questions already part of the page or is it being retrieved from a server? If the questions are already part of the page you can use jquery to show/hide the sections in order as the user progresses through the survey.
If the data is being retrieved from a server you'll need to use AJAX to fetch the next chunk of data and then reload the correct section of the page.

It is part of the page i guess but i dont know anything about jquery , cant i handle this code by adding just 2-3 rows codes?

How can handle this partial refresh stuff in html?

if you only want part of your page to be refreshed without reloading the page, you'll need to leverage javascript(js)/ajax. jQuery is a js library.

ajax is used to so you can communicate from the browser back to the web server and get a response without actually having to refresh the entire page. Then, you use js to update the portion of the page that needs updating.

jQuery just makes all of this a whole lot easier using 2-3 lines of code.

This article has been dead for over six months. Start a new discussion instead.