Section led by Ivan Lee Reachable at ivan period lee at cs period stanford period edu 1.

Slides:



Advertisements
Similar presentations
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 16 Introduction to Ajax.
Advertisements

Exploring PHP and MySQL Using an Online Travel Agency as a Case Study Charles R. Moen, M.S. Morris M. Liaw, Ph.D. October 9, 2004 ACET 2004.
6/3/2015eBiquity1 Tutorial on AJAX Anubhav Kale (akale1 AT cs DOT umbc DOT edu)
INTRO TO MAKING A WEBSITE Mark Zhang.  HTML  CSS  Javascript  PHP  MySQL  …That’s a lot of stuff!
SE-2840 Dr. Mark L. Hornick1 Java Servlet-based web apps Servlet Architecture.
Chapter 6 DOJO TOOLKITS. Objectives Discuss XML DOM Discuss JSON Discuss Ajax Response in XML, HTML, JSON, and Other Data Type.
Agenda What is AJAX? What is jQuery? Demonstration/Tutorial Resources Q&A.
Windows.Net Programming Series Preview. Course Schedule CourseDate Microsoft.Net Fundamentals 01/13/2014 Microsoft Windows/Web Fundamentals 01/20/2014.
Lecture 3 – Data Storage with XML+AJAX and MySQL+socket.io
User Interface Design using jQuery Mobile CIS 136 Building Mobile Apps 1.
Ajax (Asynchronous JavaScript and XML). AJAX  Enable asynchronous communication between a web client and a server.  A client is not blocked when an.
PHP and AJAX ISYS 475. AJAX Asynchronous JavaScript and XML: – JavaScript, Document Object Model, Cascade Style Sheet, XML, server-side script such as.Net,
JavaScript & jQuery the missing manual Chapter 11
CSCI 6962: Server-side Design and Programming Introduction to AJAX.
Lecture 12 – AJAX SFDV3011 – Advanced Web Development Reference: 1.
WEB SECURITY WEEK 3 Computer Security Group University of Texas at Dallas.
Server-side Scripting Powering the webs favourite services.
AJAX and Java ISYS 350. AJAX Asynchronous JavaScript and XML: – Related technologies: JavaScript, Document Object Model, XML, server-side script such.
GET Examples – db.org/sops/3/experimental_conditions/55http://seek.sysmo- db.org/sops/3/experimental_conditions/55 –
06/10/2015AJAX 1. 2 Introduction All material from AJAX – what is it? Traditional web pages and operation Examples of AJAX use Creating.
JavaScript – Quiz #9 Lecture Code:
Cross Site Integration “mashups” cross site scripting.
Extending HTML CPSC 120 Principles of Computer Science April 9, 2012.
Arnold Geraldo Designing and Making of The Online Auction Website Using CakePHP Framework.
AJAX محمد احمدی نیا 2 Of 27 What is AJAX?  AJAX = Asynchronous JavaScript and XML.  AJAX is not a new programming language, but.
Fall 2006 Florida Atlantic University Department of Computer Science & Engineering COP 4814 – Web Services Dr. Roy Levow Part 2 – Ajax Fundamentals.
Rails & Ajax Module 5. Introduction to Rails Overview of Rails Rails is Ruby based “A development framework for Web-based applications” Rails uses the.
Web Design: Basic to Advanced Techniques Fall 2010 Mondays 7-9pm 200 Sutardja-Dai Hall Introduction to PHP.
Ajax XMod for Dummies Building DNN Ajax Modules Without Programming Dave McMullen SoCal DNN Users Group 2/7/07 –
Server-side Programming The combination of –HTML –JavaScript –DOM is sometimes referred to as Dynamic HTML (DHTML) Web pages that include scripting are.
Facebook API Kelly Orser. Client Libraries Client libraries will simplify the calls to the platform by reducing the amount of code you have to write.
Asynchronous Javascript And XML AJAX : an introduction UFCEUS-20-2 : Web Programming.
Getting started with ASP.NET MVC Dhananjay
 Previous lessons have focused on client-side scripts  Programs embedded in the page’s HTML code  Can also execute scripts on the server  Server-side.
INT222 - Internet Fundamentals Shi, Yue (Sunny) Office: T2095 SENECA COLLEGE.
AJAX Asynchronous JavaScript and XML 1. AJAX Outline What is AJAX? Benefits Real world examples How it works 2.
Securing Angular Apps Brian Noyes
AJAX. Overview of Ajax Ajax is not an API or a programming language Ajax aims to provide more responsive web applications In normal request/response HTTP.
Section led by Ivan Lee Reachable at ivan period lee at cs period stanford period edu 1.
Ruby on Rails Controller of MVC. Routes How we map URIs like /tweets/1 to calling the show method of the Controller.
CHAPTER 8 AJAX & JSON WHAT IS AJAX? Ajax lets you…
ASSIGNMENT 2 Salim Malakouti. Ticketing Website  User submits tickets  Admins answer tickets or take appropriate actions.
JavaScript and Ajax (Internet Background) Week 1 Web site:
AJAX AJAX Asynchronous JavaScript and XML --- MADHAVI
CS 174: Web Programming November 2 Class Meeting Department of Computer Science San Jose State University Fall 2015 Instructor: Ron Mak
Intro Web Applications Andrew Benson – ScottyLabs – CrashCourse F14.
AJAX CS456 Fall Examples Where is AJAX used? Why do we care?
CITA 330 Section 10 Web Remoting Techniques. Web Remoting Web Remoting is a term used to categorize the technique of using JavaScript to directly make.
NCCUCS 軟體工程概論 Lecture 5: Ajax, Mashups April 29, 2014.
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.
AJAX. Objectives Understand and apply AJAX Using AJAX in DOJO library.
SlideSet #20: Input Validation and Cross-site Scripting Attacks (XSS) SY306 Web and Databases for Cyber Operations.
National College of Science & Information Technology.
Jim Fawcett CSE686 – Internet Programming Spring 2014
DPS Dissertation System
Jim Fawcett CSE686 – Internet Programming Spring 2012
Introduction to CGI and ajax
MIT GSL 2018 week 1 | day 4 Introduction to Web Development II.
Introduction to CGI and ajax
DWR: Direct Web Remoting
Web Browser server client 3-Tier Architecture Apache web server PHP
Web Systems Development (CSC-215)
JavaScript & jQuery AJAX.
HTTP GET vs POST SE-2840 Dr. Mark L. Hornick.
MIS JavaScript and API Workshop (Part 3)
Back end Development CS Programming Languages for Web Applications
PHP Forms and Databases.
DR. JOHN ABRAHAM PROFESSOR UTPA
Back end Development CS Programming Languages for Web Applications
Presentation transcript:

Section led by Ivan Lee Reachable at ivan period lee at cs period stanford period edu 1

- User types a character - Javascript invoked (hint: use a JS class) - Create and set a function that will be called when an HTTP status 200 is returned - Construct a POST url to a specific method of a Rails controller, incorporating any necessary parameters - Send the xmlhttp request 2

- Rails method invoked - Perform any database queries that need to be done server-side - Render a partial – this creates full HTML, which is treated as the xmlhttp response! - What happens if you return a JSON object instead? - Set the innerhtml of the appropriate object 3

 if (window.XMLHttpRequest) { this.xmlhttp = new XMLHttpRequest(); }  this.xmlhttp.onreadystatechange = function()…  this.xmlhttp.open(sMethod, sUrl)  this.xmlhttp.setRequestHeader(sName, sValue)  this.xmlhttp.send(varBody)  this.xmlhttp.responseText 4

 Make sure you think about how to make your classes and AJAX code reusable  Make sure you pass along an authenticity token! (see assignment hints section)  Encode your parameters (see assignment hints section)  Make sure thumbnails redirect to the appropriate link. If the user has a large photo collection, make sure that the selected photo is visible.  No using any other JS frameworks, or built-in Rails Ajax Helpers  Test in Firefox  Validate your HTML 5

 This is the last project! If you want to strut your stuff, this is the time to do it. You have all these tools at your disposal. 6

7