I am new to AJAX and trying to understand a question I've been given:

A HTTP request is generated by a form which contains some drop-down list. When the form is submitted, a new web page is displayed with some relevant text information (which is dependent on the list item selected). Now, the same parameters are sent to the server via an AJAX request, and the same text information is returned.

Q. What tasks would the client-side JavaScript have to do to ensure a valid request was constructed and sent?

Any useful links or quick explanations greatly appreciated.

2 Answers 2


It would be best to check that a valid drop-down value has been selected before sending an AJAX request to the server. For example, drop-downs containing an option such as "Select One" will need to be validated, and the user should be notified of an invalid selection before the ajax request occurs.

  • Thanks for your reply, this is along the lines I was thinking but I was very unsure.
    – Sarah24
    Nov 6, 2012 at 16:01
  • Glad I could help. If this answers your questions, could you please mark as accepted? Nov 6, 2012 at 16:39

I would look at the following terms in the following order:

  1. Web Page
  2. Http Request
  3. Ajax

Ajax is just a special case of a communicating Web Content. So once you feel you understand what a web page is, understand Http Request, and then go to Ajax. The Http Request part might be very technical, but it'll help you understand what javascript does when it implements ajax functionality.

  • 1
    Another useful term to google is "web page life cycle", but I couldn't find the simple explanation I would have liked to reference. Nov 6, 2012 at 15:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.