JQuery and AJAX WEB Technologies : PHP Programming Language.

Slides:



Advertisements
Similar presentations
JavaScript and AJAX Jonathan Foss University of Warwick
Advertisements

JQuery A Javascript Library Hard things made eas(ier) Norman White.
JQUERY/AJAX ALIREZA KHATAMIAN DELARAM YAZDANSEPAS.
AJAX Presented by: Dickson Fu Dimas Ariawan Niels Andreassen Ryan Dial Jordan Nielson CMPUT 410 University of Alberta 2006.
AJAX asynchronous server-client communication. Test.
AJAX (Asynchronous JavaScript and XML) Amit Jain CS 590 – Winter 2008.
Does Ajax suck? CS575 Spring 2007 Chanwit Suebsureekul.
CGI Programming: Part 1. What is CGI? CGI = Common Gateway Interface Provides a standardized way for web browsers to: –Call programs on a server. –Pass.
Fundamentals, DOM, Events, AJAX, UI Doncho Minkov Telerik Corporation
Competence Development Introduction to AJAX. What is AJAX? AJAX = Asynchronous JavaScript and XML For creating interactive web applications – Exchanging.
M. Taimoor Khan Courtesy: Norman White.
CSCI 6962: Server-side Design and Programming Introduction to AJAX.
Lecture 12 – AJAX SFDV3011 – Advanced Web Development Reference: 1.
06/10/2015AJAX 1. 2 Introduction All material from AJAX – what is it? Traditional web pages and operation Examples of AJAX use Creating.
Client side web programming Introduction Jaana Holvikivi, DSc. School of ICT.
1 © Netskills Quality Internet Training, University of Newcastle HTML Forms © Netskills, Quality Internet Training, University of Newcastle Netskills is.
Building Rich Web Applications with Ajax Linda Dailey Paulson IEEE – Computer, October 05 (Vol.38, No.10) Presented by Jingming Zhang.
Dynamic web content HTTP and HTML: Berners-Lee’s Basics.
AJAX محمد احمدی نیا 2 Of 27 What is AJAX?  AJAX = Asynchronous JavaScript and XML.  AJAX is not a new programming language, but.
Ajax. –Asynchronous JavaScript and XML –Umbrella term for technologies that often: Use client-side scripting for layout and formatting Use less than full.
Web Technology Introduction AJAXAJAX. AJAX Outline  What is AJAX?  Benefits  Real world examples  How it works  Code review  Samples.
CISC 3140 (CIS 20.2) Design & Implementation of Software Application II Instructor : M. Meyer Address: Course Page:
JavaScript Library. What is jQuery jQuery is a lightweight JavaScript library. The purpose is to make it easier to use JavaScript code on your website.
JQuery JavaScript is a powerful language but it is not always easy to work with. jQuery is a JavaScript library that helps with: – HTML document traversal.
the acronym for Asynchronous JavaScript and XML.
Web Programming Language Week 9 Dr. Ken Cosh Introducing jQuery.
INT222 - Internet Fundamentals Shi, Yue (Sunny) Office: T2095 SENECA COLLEGE.
 AJAX – Asynchronous JavaScript and XML  Ajax is used to develop fast dynamic web applications  Allows web pages to be updated asynchronously by transferring.
Module: Software Engineering of Web Applications Chapter 2: Technologies 1.
AJAX Asynchronous JavaScript and XML 1. AJAX Outline What is AJAX? Benefits Real world examples How it works 2.
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.
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
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 AJAX Asynchronous JavaScript and XML --- MADHAVI
AJAX – Asynchronous JavaScript And XML By Kranthi Kiran Nuthi CIS 764 Kansas State University.
Introduction to JQuery COGS 187A – Fall JQuery jQuery is a JavaScript library, and allows us to manipulate HTML and CSS after the page has been.
Web Technology (NCS-504) Prepared By Mr. Abhishek Kesharwani Assistant Professor,UCER Naini,Allahabad.
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)‏
JQuery form submission CIS 136 Building Mobile Apps 1.
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.
JavaScript and Ajax (Ajax Tutorial)
AJAX AJAX = Asynchronous JavaScript and XML.
AJAX and REST.
Application with Cross-Platform GUI
AJAX.
Asynchronous Java script And XML Technology
AJAX.
Introduction to AJAX MIS 3502 Jeremy Shafer Department of MIS
Session V HTML5 APIs - AJAX & JSON
Introduction to AJAX MIS 3502 Jeremy Shafer Department of MIS
Ajax and JSON (jQuery part 2)
ISC440: Web Programming 2 AJAX
HTML Level II (CyberAdvantage)
HTML5 AJAX & JSON APIs
JavaScript & jQuery AJAX.
Secure Web Programming
MIS JavaScript and API Workshop (Part 3)
Introduction to AJAX and JSON
Web Programming Language
DR. JOHN ABRAHAM PROFESSOR UTPA
Advanced Concepts and AJAX
Introduction to AJAX and JSON
Ajax and JSON Jeremy Shafer Department of MIS Fox School of Business
Client-Server Model: Requesting a Web Page
Class 4: Building Interactive Web Pages
Ajax and JSON Jeremy Shafer Department of MIS Fox School of Business
MIS Professor Sandvig MIS 424 Professor Sandvig
Presentation transcript:

JQuery and AJAX WEB Technologies : PHP Programming Language

JQuery jQuery contains powerful methods for changing and manipulating HTML elements and attributes. One very important part of jQuery is the possibility to manipulate the DOM. jQuery comes with a bunch of DOM related methods that make it easy to access and manipulate elements and attributes.

Get Content - text(), html(), and val() Three simple, but useful, jQuery methods for DOM manipulation are: text() - Sets or returns the text content of selected elements html() - Sets or returns the content of selected elements (including HTML markup) val() - Sets or returns the value of form fields

Example $("#btn1").click(function(){ alert("Text: " + $("#test").text()); }); $("#btn2").click(function(){ alert("HTML: " + $("#test").html()); });

Get Attributes - attr() The jQuery attr() method is used to get attribute values. The following example demonstrates how to get the value of the href attribute in a link: $("button").click(function(){ alert($("# super_link ").attr("href")); });

Set Content - text(), html(), and val() We will use the same three methods from the previous page to set content: text() - Sets or returns the text content of selected elements html() - Sets or returns the content of selected elements (including HTML markup) val() - Sets or returns the value of form fields The following example demonstrates how to set content with the jQuery text(), html(), and val() methods:

Example $("#btn1").click(function(){ $("#test1").text("Hello world!"); }); $("#btn2").click(function(){ $("#test2").html(" Hello world! "); }); $("#btn3").click(function(){ $("#test3").val("Dolly Duck"); });

Set Attributes - attr() The jQuery attr() method is also used to set/change attribute values. The following example demonstrates how to change (set) the value of the href attribute in a link: $("button").click(function(){ $("#super_link").attr("href", " });

jQuery - AJAX get() and post() Methods The jQuery get() and post() methods are used to request data from the server with an HTTP GET or POST request. HTTP Request: GET vs. POST Two commonly used methods for a request-response between a client and server are: GET and POST. GET - Requests data from a specified resource POST - Submits data to be processed to a specified resource

jQuery - AJAX AJAX is the art of exchanging data with a server, and updating parts of a web page - without reloading the whole page. AJAX = Asynchronous JavaScript and XML. In short; AJAX is about loading data in the background and display it on the webpage, without reloading the whole page. Examples of applications using AJAX: Gmail, Google Maps, Youtube, and Facebook tabs.

jQuery $.get() Method The $.get() method requests data from the server with an HTTP GET request. $.get(URL,callback); $("button").click(function(){ $.get(“users.php", function(data, status){ alert("Data: " + data + “Status: " + status); }); });

jQuery $.post() Method The $.post() method requests data from the server using an HTTP POST request. $.post(URL,data,callback); The required URL parameter specifies the URL you wish to request. The optional data parameter specifies some data to send along with the request. The optional callback parameter is the name of a function to be executed if the request succeeds.

Example $("button").click(function(){ $.post(“users.php", { name: “ilyas", city: “almaty" }, function(data, status){ alert("Data: " + data + "Status: " + status); }); });

Thank you for attention