CS 142 Lecture Notes: AjaxSlide 1 AJAX Basics xhr = new XMLHttpRequest(); xhr.onreadystatechange = xhrHandler; xhr.open("POST", url); xhr.send(postData);...

Slides:



Advertisements
Similar presentations
CS 142 Lecture Notes: Rails Controllers and ViewsSlide 1 Simple Rails Template
Advertisements

Dodick Zulaimi Sudirman Lecture 12 Introduction to AJAX Pengantar Teknologi Internet Introduction to Internet Technology.
1 AJAX – Asynchronous JavaScript and XML – Part II CS , Spring 2010.
9. AJAX & RIA. 2 Motto: O! call back yesterday, bid time return. — William Shakespeare.
AJAX (Asynchronous JavaScript and XML) Amit Jain CS 590 – Winter 2008.
1 JavaScript & AJAX CS , Spring JavaScript.
CS 142 Lecture Notes: FormsSlide 1 AJAX Basics xhr = new XMLHttpRequest(); xhr.onreadystatechange = xhrHandler(); xhr.open("POST", url); xhr.send(postData);...
Chapter 6 DOJO TOOLKITS. Objectives Discuss XML DOM Discuss JSON Discuss Ajax Response in XML, HTML, JSON, and Other Data Type.
Prof. James A. Landay University of Washington Spring 2008 Web Interface Design, Prototyping, and Implementation Rich Internet Applications: AJAX, Server.
JSON (JavaScript Object Notation).  A lightweight data-interchange format  A subset of the object literal notation of JavaScript (or ECMA-262).  A.
Interactive Web Application with AJAX
Ajax Basics The XMLHttpRequest Object. Ajax is…. Ajax is not…. Ajax is not a programming language. Ajax is not a programming language. Ajax is a methodology.
JavaScript & jQuery the missing manual Chapter 11
CSCI 6962: Server-side Design and Programming Introduction to AJAX.
 2008 Pearson Education, Inc. All rights reserved Ajax-Enabled Rich Internet Applications.
Intro to JavaScript Events. JavaScript Events Events in JavaScript let a web page react to some type of input Many different ways to handle events due.
CS 190 Lecture Notes: Tweeter ProjectSlide 1 Uniform Resource Locators (URLs) Scheme Host.
XMLHttpRequest Object When Microsoft Internet Explorer 5.0 introduced a rudimentary level of XML support, an ActiveX library called MSXML was also introduced,
Asterisk based real-time social chat Advisor : Lian-Jou Tsai Student : Jhe-Yu Wu.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 16 Introduction to Ajax.
Saving Form Data You can save form data in Google Spreadsheets using the following steps. 1.Create a Google Spreadsheet in your documents 2.Use Tools to.
Lecture 9: AJAX, Javascript review..  AJAX  Synchronous vs. asynchronous browsing.  Refreshing only “part of a page” from a URL.  Frameworks: Prototype,
Ajax. –Asynchronous JavaScript and XML –Umbrella term for technologies that often: Use client-side scripting for layout and formatting Use less than full.
Rails & Ajax Module 5. Introduction to Rails Overview of Rails Rails is Ruby based “A development framework for Web-based applications” Rails uses the.
Asynchronous Javascript And XML AJAX : an introduction UFCEUS-20-2 : Web Programming.
School of Computing and Information Systems CS 371 Web Application Programming AJAX.
AJAX in ASP.NET MVC AJAX, Partial Page Rendering, jQuery AJAX, MVC AJAX Helpers SoftUni Team Technical Trainers Software University
Events & Callbacks (ESaaS §6.5) © 2013 Armando Fox & David Patterson, all rights reserved.
INFO 344 Web Tools And Development CK Wang University of Washington Spring 2014.
 AJAX – Asynchronous JavaScript and XML  Ajax is used to develop fast dynamic web applications  Allows web pages to be updated asynchronously by transferring.
SE-2840 Dr. Mark L. Hornick 1 Introduction to Ajax Asynchronous Javascript And XML.
AJAX. Ajax  $.get  $.post  $.getJSON  $.ajax  json and xml  Looping over data results, success and error callbacks.
CS 142 Lecture Notes: FormsSlide 1 Simple Form Product: Price:
CHAPTER 8 AJAX & JSON WHAT IS AJAX? Ajax lets you…
AJAX and REST. Slide 2 What is AJAX? It’s an acronym for Asynchronous JavaScript and XML Although requests need not be asynchronous It’s not really a.
Dave Salinas. What is XML? XML stands for eXtensible Markup Language Markup language, like HTML HTML was designed to display data, whereas XML was designed.
AJAX in Ruby-on-Rails. Ruby on Rails and AJAX AJAX can be done with just Javascript Easier if you use libraries –Prototype –SAJAX –jQuery Libraries only.
AJAX CS456 Fall Examples Where is AJAX used? Why do we care?
1 AJAX. AJAX – Whatzit? Asynchronous (content loading)‏ Javascript (logic & control)‏ And XML (request handling)‏
Section led by Ivan Lee Reachable at ivan period lee at cs period stanford period edu 1.
JavaScript, Sixth Edition Chapter 11 Updating Web Pages with Ajax.
NCCUCS 軟體工程概論 Lecture 5: Ajax, Mashups April 29, 2014.
Return to Home! Go To Next Slide! Return to Home! Go To Next Slide!
JQuery, JSON, AJAX. AJAX: Async JavaScript & XML In traditional Web coding, to get information from a database or a file on the server –make an HTML form.
CSE 154 Lecture 11: AJAx.
Understanding XMLHttpRequest
AJAX AJAX = Asynchronous JavaScript and XML.
CS 371 Web Application Programming
AJAX and jQuery AJAX AJAX Concepts, XMLHttpRequest, jQuery AJAX: $.ajax(), $.get(), $.post() jQuery AJAX XMLHttpRequest SoftUni Team Technical Trainers.
Callback Function function passed as a parameter to another function
AJAX – Asynchronous JavaScript and XML
CSE 154 Lecture 11: AJAx.
CSE 154 Lecture 22: AJAX.
JavaScript & AJAX.
AJAX Basics xhr = new XMLHttpRequest();
Asynchronous Javascript And XML
Ajax on Rails 28-Nov-18.
CS 140 Lecture Notes: Protection
CS 140 Lecture Notes: Protection
CS 142 Lecture Notes: Cookies
AJAX Basics xhr = new XMLHttpRequest();
JavaScript & jQuery AJAX.
AJAX Basics xhr = new XMLHttpRequest();
CS 140 Lecture Notes: Protection
Lecture 12: The Fetch Api and AJAx
AJAX CS-422 Dick Steflik.
DR. JOHN ABRAHAM PROFESSOR UTPA
Chengyu Sun California State University, Los Angeles
Chengyu Sun California State University, Los Angeles
Uniform Resource Locators (URLs)
Presentation transcript:

CS 142 Lecture Notes: AjaxSlide 1 AJAX Basics xhr = new XMLHttpRequest(); xhr.onreadystatechange = xhrHandler; xhr.open("POST", url); xhr.send(postData);... function xhrHandler() { if (this.readyState != 4) { return; } if (this.status != 200) { // Handle error... return; }... var text = this.responseText; var document = this.responseXML; } State 4 means “done” Response available as raw text or XML

CS 142 Lecture Notes: AjaxSlide 2 JSON Example {name: "Alice", gpa: 3.5, friends: ["Bill", "Carol", "David"]}

Slide 3 Higher-Level AJAX Example... <%= observe_field( :form_userName, :update => "completionMenu", :url => {:action => "nameChoices"} ) %> class FooController < ApplicationController def nameChoices prefix = params[:form][:userName]... compute names... render :partial => "name_list", :layout => false end Name: Al Alfred Wang Alice Washington Allen Williams Allison McLean Alok Chandra

Slide 4 Higher-Level AJAX Example... <%= observe_field( :form_userName, :update => "completionMenu", :url => {:action => "nameChoices"} ) %> class FooController < ApplicationController def nameChoices prefix = params[:form][:userName]... compute names... render :partial => "name_list", :layout => false end Name: Al Alfred Wang Alice Washington Allen Williams Allison McLean Alok Chandra

CS 142 Lecture Notes: AjaxSlide 5