Development AJAX

Home > Preview

The flashcards below were created by user mateotete on FreezingBlue Flashcards.


  1. What is AJAX?
    An acronym for Asynchronous JavaScript and XML, it is a group of interrelated web technologies using JavaScript and XML and capable of modifying HTML, the DOM, CSS, and more asynchronously (in background) without affecting webpage behavior. Uses XMLHttpRequest object and can return plan text, JSON, or XML.
  2. What is so new and great about AJAX?
    Traditional pages required content to be updated by making a request from the user's browser to the server and back in a post. With AJAX, small bits of information can be done this same way without a SUBMIT button or similar action being done by the user, so that a list of current users can be pulled down in a combobox or items in a textbox can be validated for accuracy before form has been submitted--therefore, obviously faster and more fluid for the user.
  3. What major companies use AJAX?
    Google Maps, GMAIL, YouTube, FaceBook, Yahoo Weather, RSS Feeds, etc.
  4. Create a JSON list of US states which could then be used in an AJAX call.
    var US = {"AL":{"count":"0","name":"Alabama","abbr":"AL"},"AK":{"count":"1","name":"Alaska","abbr":"AK"},"AZ":{"count":"2","name":"Arizona ","abbr":"AZ"},"AR":{"count":"3","name":"Arkansas","abbr":"AR"},"CA":{"count":"4","name":"California ","abbr":"CA"} };
  5. Which is better for AJAX calls, POST or GET? Why?
    Get can be used in most situations and is faster, however, Post is typically unlimited content and more secure.
  6. Give the most simplest steps needed for an AJAX call.
    An event occurs, resulting in an XMLHttpRequest object being created and the corresponding HttpRequest being sent to the server, the HttpRequest is processed and a response is sent back to the user's browser where the response is interpreted using JavaScript and the user's page is updated (typically against the DOM).
  7. What format is used when receiving data from an AJAX call?
    XML is commonly used as the format for receiving server data, although any format, including JSON or plain text, can be used.
  8. What are some common Microsoft.NET Ajax Control Toolkit controls?
    ModalPopup, Accordian, AutoComplete, Calendar, FilteredTextBox, TextBoxWaterMarks, and ValidatorCallout
  9. Write a simple AJAX function call which replaces the content of a "div" element to the content located in a file.
    var xmlhttp;if (window.XMLHttpRequest){ xmlhttp=new XMLHttpRequest();} xmlhttp.onreadystatechange=function() {if (xmlhttp.readyState==4 && xmlhttp.status==200){ document.getElementById("myDiv").innerHTML = xmlhttp.responseText;}} xmlhttp.open("GET","ajax_info.txt",true);xmlhttp.send();
  10. Explain the steps needed to write a simple ASP.NET page which will have label contents updated using AJAX when clicking a button.
    (1) Place two controls on the page, the ScriptManager and the UpdatePanel (2) in the UpdatePanel, create a label and a button (3) on server side, create a button event which provides a message and the server date and time value (4) you can toggle between Ajax and a full postback by setting the ScriptManager attribute of enablepartialrendering to true / false.
  11. Write a simple jQuery function to popup an alert box with a Person object name using JSON.
    • $("button").click(function(){
    •    $.getJSON("demo.js", function(result){
    •       $.each(result, function(i, username){
    •          alert('Username: ' + username);
    •       });
    •    });
    • });

Card Set Information

Author:
mateotete
ID:
271125
Filename:
Development AJAX
Updated:
2017-08-10 19:33:55
Tags:
Software Development AJAX
Folders:
Software Development AJAX
Description:
Software Development AJAX
Show Answers:

What would you like to do?

Home > Flashcards > Print Preview