Tutorial básico del método AJAX con PHP y MySQL

Size: px
Start display at page:

Download "Tutorial básico del método AJAX con PHP y MySQL"

Transcription

1 1 de 14 02/06/ :10 Tutorial básico del método AJAX con PHP y MySQL The XMLHttpRequest object is a handy dandy JavaScript object that offers a convenient way for webpages to get information from servers without refreshing themselves. The benefit to end users is that they don't have to type as much and they don't have to wait as long. For example, having the user's city and state show up in a webpage automatically after the ZIP code has been typed in is a big time saver. Although the XMLHttpRequest object might sound complex and different from any other JavaScript object you have ever used, it really isn't. A good way to think of the XMLHttpRequest object is as you would think of the JavaScript Image object. As we know, with the Image object you can dynamically specify a new URL for the image source without reloading the page. Similarly with the XMLHttpRequest object, you can dynamically specify a URL to get some server data without reloading the page. The purpose of this article is to demonstrate through a series of baby steps just how easy it is to use the XMLHttpRequest object. In order to complete this tutorial you should have some basic PHP, MySQL and JavaScript experience. That said, the PHP programming in these examples is so basic that if you do not have PHP experience, it may still be possible for you to look at the PHP code and apply the functionality to your weapon of choice, be it PERL, ASP, or JSP. 1. Creating the Form We first create a simple webpage that has the HTML for our Web form. There is nothing out of the ordinary here - just basic HTML defining the city, state, and ZIP code. 1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" " 2. < html xmlns=" > 3. < head> 4. < title>zip Code to City and State using XmlHttpRequest</title> 5. </ head> 6. < body> 7. < form action="post"> 8. < p> 9. ZIP code: 10. < input type="text" size="5" name="zip" id="zip" /> 11. </ p> 12. City: 13. < input type="text" name="city" id="city" /> 14. State: 15. < input type="text" size="2" name="state" id="state" /> 16. </ form> 17. </ body> 18. </ html>

2 2 de 14 02/06/ :10 2. Adding the Event Handler We then add an onblur event handler function named updatecitystate(). This event handler is called whenever the ZIP code field loses focus. onblur="updatecitystate();" The updatecitystate() function will be in charge of asking the server what the city and state is for a given Zip code. For now, this function does nothing. We will add its guts later. 1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" " 2. < html xmlns=" > 3. < head> 4. < title>zip Code to City and State using XmlHttpRequest</title> 5. < script language="javascript" type="text/javascript"> function updatecitystate() { } </script> 6. </head> 7. <body> 8. <form action="post"> 9. <p> 10. ZIP code: 11. <input 12. type="text" size="5" name="zip" id="zip" 13. onblur="updatecitystate();" 14. /> 15. </p> 16. City: 17. <input type="text" name="city" id="city" /> 18. State: 19. <input type="text" size="2" name="state" id="state" /> 20. </form> 21. </body> 22. </html> 3. Creating the XMLHttpRequest Object Of course we need to create an XMLHttpRequest object. Because of variations among the Web browsers, creating this object is more complicated than it need be. The best way to create the XMLHttpRequest object is to use a function named gethttpobject(). This function has precompile directives which make it pretty cross-browser compatible. Don't worry if the code inside the function is unclear to you. It's not important that you understand its inner workings.

3 1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" " 2. < html xmlns=" > 3. < head> 4. < title>zip Code to City and State using XmlHttpRequest</title> 5. < script language="javascript" type="text/javascript"> 6. function updatecitystate() { 7. } 8. function gethttpobject() { 9. var xmlhttp; 10. /*@cc_on (@_jscript_version >= 5) 12. try 13. { 14. xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); 15. } 16. catch (e) 17. { 18. try 19. { 20. xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); 21. } 22. catch (E) 23. { 24. xmlhttp = false; 25. } 26. } xmlhttp = if (!xmlhttp && typeof XMLHttpRequest!= 'undefined') { try { xmlhttp = new XMLHttpRequest(); } catch (e) { xmlhttp = false; 39. } 40. } 41. return xmlhttp; 42. } 43. var http = gethttpobject(); // We create the HTTP Object 44. </script> 45. </head> 46. <body> 47. <form action="post"> 48. <p> 49. ZIP code: 50. <input type="text" size="5" name="zip" id="zip" onblur="updatecitystate();" /> 51. </p> 52. City: 53. <input type="text" name="city" id="city" /> 54. State: 55. <input type="text" size="2" name="state" id="state" /> 56. </form> 3 de </body> 58. </html> 02/06/ :10

4 4 de 14 02/06/ :10 4. Some Instant Gratification Now lets get some instant gratification and add the code that makes the round trip to the server. We first specify the URL for the server-side script to be getcitystate.php?param=. This URL will then have the ZIP Code appended to it so that the ZIP code is passed as an HTTP GET parameter named param. This means that if a user types in the ZIP code of 17534, the resulting URL would be getcitystate.php?param= Before we send the HTTP request, we specify the onreadystatechange property to be the name of our new function handlehttpresponse(). This means that every time the HTTP ready state has changed, our function handlehttpresponse() is called. Our new function handlehttpresponse() sits there waiting to be called and when it does get called, it check to see if the readstate is equal to 4. If it is equal to 4 this means that the request is complete. Since the request is complete, it is now fair game to grab the response text (responsetext), unpack it, and set the city and state form fields to the returned values. (More readystate info found here.)

5 5 de 14 02/06/ :10 1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" " 2. < html xmlns=" > 3. < head> 4. < title>zip Code to City and State using XmlHttpRequest</title> 5. < script language="javascript" type="text/javascript"> 6. var url = "getcitystate.php?param="; // The server-side script function handlehttpresponse() { if (http.readystate == 4 7. function updatecitystate() { 8. var zipvalue = document.getelementbyid("zip").value; http.open("get", url + escape(zipvalue), } 11. function gethttpobject() { 12. var xmlhttp; 13. /*@cc_on (@_jscript_version >= 5) 15. try { 16. xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); 17. } catch (e) { 18. try { 19. xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); 20. } catch (E) { 21. xmlhttp = false; 22. } 23. } 25. xmlhttp = 27. if (!xmlhttp && typeof XMLHttpRequest!= 'undefined') { 28. try { 29. xmlhttp = new XMLHttpRequest(); 30. } catch (e) { 31. xmlhttp = false; 32. } 33. } 34. return xmlhttp; 35. } 36. var http = gethttpobject(); // We create the HTTP Object 37. </script> 38. </head> 39. <body> 40. <form action="post"> 41. <p> 42. ZIP code: 43. <input type="text" size="5" name="zip" id="zip" onblur="updatecitystate();" /> 44. </p> 45. City: 46. <input type="text" name="city" id="city" /> 47. State: 48. <input type="text" size="2" name="state" id="state" /> 49. </form> 50. </body> 51. </html>

6 6 de 14 02/06/ :10 I promised instant gratification so lets now create a PHP file named getcitystate.php. All this file does is return "Buzzard Puckey,NM" as the city and state. This means that anytime the focus leaves the ZIP code field, the city and state will be automatically set to Buzzard Puckey, NM <?php echo "Buzzard Puckey,NM";?> 5. Creating the ZIP code database This tutorial refers to a MySQL table named zipcodes. The easiest way to create the zipcodes table in our MySQL database is to execute a prepackaged SQL query. If you have PhpMyAdmin installed, you can simply navigate to your database of choice and then eqecute the SQL query below. A zipcodes table will created in your database. SQL [inicio] 1. # 2. # TABLE structure FOR TABLE `zipcodes` 3. # CREATE TABLE `zipcodes` ( 6. `zipcode` mediumint(9) NOT NULL DEFAULT '0', 7. `city` TINYTEXT NOT NULL, 8. `state` char(2) NOT NULL DEFAULT '', 9. `areacode` smallint(6) NOT NULL DEFAULT '0', 10. PRIMARY KEY (`zipcode`), 11. UNIQUE KEY `zipcode_2` (`zipcode`), 12. KEY `zipcode` (`zipcode`) 13. ) TYPE=MyISAM; SQL [fin] The data for our ZIP code database is in a Comma Separated Value (CSV) file format. The best way to add the data in this file to our table is to run PhpMyAdmin and perform the following steps Select the zipcodes table in PhpMyAdmin to bring up its corresponding page. Scroll to the bottom of the zipcodes table page and look for a link that says "Insert data from a textfile into table". Click on the "Insert data from a textfile into table" link. 4. Complete the properties for the text file. It's fields are terminated by ',' and the LOAD method should be "DATA LOCAL". Once filled out, the form should look similar to the image below: 5. PhpMyAdmin Graphic Click the "Submit" button 6. Querying the ZIP Code Database We will retrieve the matching city and state from our zipcodes table by performing a simple query. Using the code below, modify lines 9-11 to reflect your database settings and then save the file as getcitystate.php Once you have changed the code to reflect your database settings, a good way to test this file is to use your Web browser and launch its URL complete with a query string containing a ZIP code. An example of what the URL would look like is the following: Did the above URL produce a city,state pair as output? If so you are good to go. Try out the ZIP code functionality with the HTML file you created containing the XMLHttpRequest code.

7 7 de 14 02/06/ :10 1. <?php 2. /** 3. * Connects to the database. 4. * Return false if connection failed. 5. * Be sure to change the $database_name. $database_username, and 6. * $database_password values to reflect your database settings. 7. */ 8. function db_connect() { 9. $database_name = 10. 'mysql' 11. ; // Set this to your Database Name 12. $database_username = 13. 'root' 14. ; // Set this to your MySQL username 15. $database_password = 16. '' 17. ; // Set this to your MySQL password 18. $result = mysql_pconnect('localhost',$database_username, $database_password); 19. if (! $result) return false; 20. if (! mysql_select_db($database_name)) return false; return $result; } $conn = db_connect(); // Connect to database 24. if ($conn) { 25. $zipcode = $_GET['param']; // The parameter passed to us 26. $query = "select * from zipcodes where zipcode = '$zipcode'" ; 27. $result = mysql_query($query,$conn); 28. $count = mysql_num_rows($result); 29. if ( $count > 0) { 30. $city = mysql_result($result,0,'city'); 31. $state = mysql_result($result,0,'state'); 32. } 33. } 34. if (isset( $city) && isset($state)) { 35. $return_value = $city. ",". $state; 36. } 37. else { 38. $return_value = "invalid".",".$_get['param']; // Include Zip for debugging purposes 39. } 40. echo $return_value; // This will become the response value for the XMLHttpRequest object 41.?>

8 8 de 14 02/06/ :10 7. Room for Improvement In our haste to get our code up and running, we have neglected the following scenarios: 1. Invalid ZIP codes are typed in The visitor's browser does not support the XMLHttpRequest object. A request is made before the last request has completed. Lets make ourselves feel all warm and fuzzy inside and add the highlighted code below to our HTML file:

9 1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" " 2. < html xmlns=" > 3. < head> 4. < title>zip Code to City and State using XmlHttpRequest</title> 5. < script language="javascript" type="text/javascript"> 6. var url = "getcitystate.php?param="; // The server-side script 7. function handlehttpresponse() { 8. if ( http.readystate == 4) { if ( http.responsetext.indexof('invalid') == -1) { // Split the comma delimited response into an array 13. results = http.responsetext.split(","); 14. document.getelementbyid('city').value = results[0]; 15. document.getelementbyid('state').value = results[1]; isworking = false; } } 23. } 24. var isworking = false; function updatecitystate() { if (! isworking && http) { var zipvalue = document.getelementbyid("zip").value; 31. http.open("get", url + escape(zipvalue), true); 32. http.onreadystatechange = handlehttpresponse; isworking = true; http.send(null); } } 41. function gethttpobject() { 42. var xmlhttp; 43. /*@cc_on (@_jscript_version >= 5) 45. try { 46. xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); 47. } catch (e) { 48. try { 49. xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); 9 de } catch (E) { 51. xmlhttp = false; 02/06/ :10

10 10 de 14 02/06/ :10 8. What about the XML? Ok, by now you might be asking yourself, "what about with the XML"? After all, we are using the JavaScript XMLHttpRequest object - not the PlainTextHttpRequest object. Are you feeling jipped? Let me explain. For our ZIP code example, since the query return results are so simple, there hasn't really been a need to use XML. That said, we all would like to do a little XML, if only for the sake of fluffing our resume's with more XML experience. Lets convert the query return results to XML. This is done on the server side by editing getcitystate.php We first comment out line #29 which was the old way of packaging the city and state data. Next we add line #30 which packages the city and state in XML. There are more elegant ways to do this, but for now quick and dirty will work. Finally, we add line #36 which generates the necessary XML header: header('content-type: text/xml'); Without this header, the JavaScript XMLHttpRequest object will not recognize the data as XML, and you will find yourself beating your head against the wall for quite some time.

11 11 de 14 02/06/ :10 1. <?php 2. /** 3. * Connects to the database. 4. * Return false if connection failed. 5. * Be sure to change the $database_name. $database_username, and 6. * $database_password values to reflect your database settings. 7. */ 8. function db_connect() { 9. $database_name = 'mysql'; // Set this to your Database Name 10. $database_username = 'root'; // Set this to your MySQL username 11. $database_password = ''; // Set this to your MySQL password 12. $result = mysql_pconnect('localhost',$database_username, $database_password); 13. if (! $result) return false; 14. if (! mysql_select_db($database_name)) return false; return $result; } $conn = db_connect(); // Connect to database 18. if ($conn) { 19. $zipcode = $_GET['param']; // The parameter passed to us 20. $query = "select * from zipcodes where zipcode = '$zipcode'" ; 21. $result = mysql_query($query,$conn); 22. $count = mysql_num_rows($result); 23. if ( $count > 0) { 24. $city = mysql_result($result,0,'city'); 25. $state = mysql_result($result,0,'state'); 26. } 27. } 28. if (isset( $city) && isset($state)) { 29. // $return_value = $city. ",". $state; 30. $return_value = '<?xml version="1.0" standalone="yes"?><zip><city>'.$city.'</city><state>' } 33. else { 34. $return_value = "invalid".",".$_get['param']; // Include Zip for debugging purposes 35. } 36. header('content-type: text/xml'); echo $return_value; // This will become the response value for the XMLHttpRequest object 39.?> On the client side, we switch to using the responsexml property rather than the responsetext property for retrieving the output from our server script. The responsexml property gives us an XMLDocument object that we can traverse to get our city and state data.

12 12 de 14 02/06/ :10

13 // Use the XML DOM to unpack the city and state data var xmldocument = http.responsexml; var city = xmldocum 1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" " 2. < html xmlns=" > 3. < head> 4. < title>zip Code to City and State using XmlHttpRequest</title> 5. < script language="javascript" type="text/javascript"> 6. var url = "getcitystate.php?param="; // The server-side script 7. function handlehttpresponse() { 8. if ( http.readystate == 4) { 9. if ( http.responsetext.indexof('invalid') == -1) { document.getelementbyid('city').value = city; 13. document.getelementbyid('state').value = state; 14. isworking = false; 15. } 16. } 17. } 18. var isworking = false; 19. function updatecitystate() { 20. if (! isworking && http) { 21. var zipvalue = document.getelementbyid("zip").value; 22. http.open("get", url + escape(zipvalue), true); 23. http.onreadystatechange = handlehttpresponse; 24. isworking = true; 25. http.send(null); 26. } 27. } 28. function gethttpobject() { 29. var xmlhttp; 30. /*@cc_on (@_jscript_version >= 5) 32. try { 33. xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); 34. } catch (e) { 35. try { 36. xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); 37. } catch (E) { 38. xmlhttp = false; 39. } 40. } 42. xmlhttp = 44. if (!xmlhttp && typeof XMLHttpRequest!= 'undefined') { 45. try { 46. xmlhttp = new XMLHttpRequest(); de xmlhttp.overridemimetype("text/xml"); } 02/06/ :10

14 14 de 14 02/06/ :10 9. Final Thoughts Using the XMLHttpRequest object to perform remote scripting is a pretty straight forward process. Although XML data can be retrieved pretty easily with the XMLHttpRequest object, it is not a requirement for you to use XML as your data format. For simple data such as in our ZIP code example, it actually makes more sense to not use XML. XML has downsides. One downside is that XML necessitates validation which has a performance impact. In addition, the XML representation of our data required much more bandwidth to transfer than the non-xml data. The ZIP code data file that was provided could be out of date. Unfortunately, to use the latest data means that you will need to subscribe to a service. The USPS offers a Web service however it looks like you need to either agree to use their service for shipping exclusively with USPS or you need to pay them a large chunk of money. There are many companies that provide ZIP code data services that you can find easily on Google. With the ZIP code example, we did not fool with the area code. Adding automatic completion of the area code is dirt easy to do. I just chose not to include it for the sake of making the example as concise as possible. Articulos similares: Using the XML HTTP Request object El objeto XMLHttpRequest AJAX un nuevo acercamiento a Aplicaciones Web Remote Scripting RPC vía HTTP o Como recoger información desde el servidor sin recargar la página. Recarga de página controlada Tutorial de AJAX (Asynchronous JavaScript + XML)

Credits: Some of the slides are based on material adapted from www.telerik.com/documents/telerik_and_ajax.pdf

Credits: Some of the slides are based on material adapted from www.telerik.com/documents/telerik_and_ajax.pdf 1 The Web, revisited WEB 2.0 [email protected] Credits: Some of the slides are based on material adapted from www.telerik.com/documents/telerik_and_ajax.pdf 2 The old web: 1994 HTML pages (hyperlinks)

More information

Client-side Web Engineering From HTML to AJAX

Client-side Web Engineering From HTML to AJAX Client-side Web Engineering From HTML to AJAX SWE 642, Spring 2008 Nick Duan 1 What is Client-side Engineering? The concepts, tools and techniques for creating standard web browser and browser extensions

More information

Software Requirements Specification For Real Estate Web Site

Software Requirements Specification For Real Estate Web Site Software Requirements Specification For Real Estate Web Site Brent Cross 7 February 2011 Page 1 Table of Contents 1. Introduction...3 1.1. Purpose...3 1.2. Scope...3 1.3. Definitions, Acronyms, and Abbreviations...3

More information

Core Ideas CHAPTER 1 PART. CHAPTER 2 Pre-Ajax JavaScript Communications Techniques CHAPTER 3 XMLHttpRequest Object CHAPTER 4 Data Formats

Core Ideas CHAPTER 1 PART. CHAPTER 2 Pre-Ajax JavaScript Communications Techniques CHAPTER 3 XMLHttpRequest Object CHAPTER 4 Data Formats Core Ideas CHAPTER 1 Introduction to Ajax I PART CHAPTER 2 Pre-Ajax JavaScript Communications Techniques CHAPTER 3 XMLHttpRequest Object CHAPTER 4 Data Formats ch01.indd 1 12/5/07 4:59:45 PM blind folio

More information

What is AJAX? Ajax. Traditional Client-Server Interaction. What is Ajax? (cont.) Ajax Client-Server Interaction. What is Ajax? (cont.

What is AJAX? Ajax. Traditional Client-Server Interaction. What is Ajax? (cont.) Ajax Client-Server Interaction. What is Ajax? (cont. What is AJAX? Ajax Asynchronous JavaScript and XML Ronald J. Glotzbach Ajax is not a technology Ajax mixes well known programming techniques in an uncommon way Enables web builders to create more appealing

More information

It is highly recommended that you are familiar with HTML and JavaScript before attempting this tutorial.

It is highly recommended that you are familiar with HTML and JavaScript before attempting this tutorial. About the Tutorial AJAX is a web development technique for creating interactive web applications. If you know JavaScript, HTML, CSS, and XML, then you need to spend just one hour to start with AJAX. Audience

More information

Table of contents. HTML5 Data Bindings SEO DMXzone

Table of contents. HTML5 Data Bindings SEO DMXzone Table of contents Table of contents... 1 About HTML5 Data Bindings SEO... 2 Features in Detail... 3 The Basics: Insert HTML5 Data Bindings SEO on a Page and Test it... 7 Video: Insert HTML5 Data Bindings

More information

SmartTouch R CRM Enhancements. 1. Administrators now have an Account Preferences Section where you can view emails & phones in search views.

SmartTouch R CRM Enhancements. 1. Administrators now have an Account Preferences Section where you can view emails & phones in search views. SmartTouch R CRM Enhancements 1. Administrators now have an Account Preferences Section where you can view emails & phones in search views. You now have the option to view Email Address and/or Phone Number

More information

Designing and Implementing an Online Bookstore Website

Designing and Implementing an Online Bookstore Website KEMI-TORNIO UNIVERSITY OF APPLIED SCIENCES TECHNOLOGY Cha Li Designing and Implementing an Online Bookstore Website The Bachelor s Thesis Information Technology programme Kemi 2011 Cha Li BACHELOR S THESIS

More information

Web Programming Step by Step

Web Programming Step by Step Web Programming Step by Step Chapter 10 Ajax and XML for Accessing Data Except where otherwise noted, the contents of this presentation are Copyright 2009 Marty Stepp and Jessica Miller. 10.1: Ajax Concepts

More information

Web Development using PHP (WD_PHP) Duration 1.5 months

Web Development using PHP (WD_PHP) Duration 1.5 months Duration 1.5 months Our program is a practical knowledge oriented program aimed at learning the techniques of web development using PHP, HTML, CSS & JavaScript. It has some unique features which are as

More information

Getting Started with Dynamic Web Sites

Getting Started with Dynamic Web Sites PHP Tutorial 1 Getting Started with Dynamic Web Sites Setting Up Your Computer To follow this tutorial, you ll need to have PHP, MySQL and a Web server up and running on your computer. This will be your

More information

Introduction to web development and JavaScript

Introduction to web development and JavaScript Objectives Chapter 1 Introduction to web development and JavaScript Applied Load a web page from the Internet or an intranet into a web browser. View the source code for a web page in a web browser. Knowledge

More information

Term Paper. P r o f. D r. E d u a r d H e i n d l. H o c h s c h u l e F u r t w a n g e n U n i v e r s i t y. P r e s e n t e d T o :

Term Paper. P r o f. D r. E d u a r d H e i n d l. H o c h s c h u l e F u r t w a n g e n U n i v e r s i t y. P r e s e n t e d T o : Version: 0.1 Date: 20.07.2009 Author(s): Doddy Satyasree AJAX Person responsable: Doddy Satyasree Language: English Term Paper History Version Status Date 0.1 Draft Version created 20.07.2009 0.2 Final

More information

WIRIS quizzes web services Getting started with PHP and Java

WIRIS quizzes web services Getting started with PHP and Java WIRIS quizzes web services Getting started with PHP and Java Document Release: 1.3 2011 march, Maths for More www.wiris.com Summary This document provides client examples for PHP and Java. Contents WIRIS

More information

WebSphere Business Monitor V7.0 Script adapter lab

WebSphere Business Monitor V7.0 Script adapter lab Copyright IBM Corporation 2010 All rights reserved IBM WEBSPHERE BUSINESS MONITOR 7.0 LAB EXERCISE WebSphere Business Monitor V7.0 Script adapter lab What this exercise is about... 1 Changes from the previous

More information

Performance Testing for Ajax Applications

Performance Testing for Ajax Applications Radview Software How to Performance Testing for Ajax Applications Rich internet applications are growing rapidly and AJAX technologies serve as the building blocks for such applications. These new technologies

More information

INSTALLING, CONFIGURING, AND DEVELOPING WITH XAMPP

INSTALLING, CONFIGURING, AND DEVELOPING WITH XAMPP INSTALLING, CONFIGURING, AND DEVELOPING WITH XAMPP by Dalibor D. Dvorski, March 2007 Skills Canada Ontario DISCLAIMER: A lot of care has been taken in the accuracy of information provided in this article,

More information

CMSC434 TUTORIAL #3 HTML CSS JavaScript Jquery Ajax + Google AppEngine Mobile WebApp HTML5

CMSC434 TUTORIAL #3 HTML CSS JavaScript Jquery Ajax + Google AppEngine Mobile WebApp HTML5 CMSC434 TUTORIAL #3 HTML CSS JavaScript Jquery Ajax + Google AppEngine Mobile WebApp HTML5 JQuery Recap JQuery source code is an external JavaScript file

More information

SUBJECT CODE : 4074 PERIODS/WEEK : 4 PERIODS/ SEMESTER : 72 CREDIT : 4 TIME SCHEDULE UNIT TOPIC PERIODS 1. INTERNET FUNDAMENTALS & HTML Test 1

SUBJECT CODE : 4074 PERIODS/WEEK : 4 PERIODS/ SEMESTER : 72 CREDIT : 4 TIME SCHEDULE UNIT TOPIC PERIODS 1. INTERNET FUNDAMENTALS & HTML Test 1 SUBJECT TITLE : WEB TECHNOLOGY SUBJECT CODE : 4074 PERIODS/WEEK : 4 PERIODS/ SEMESTER : 72 CREDIT : 4 TIME SCHEDULE UNIT TOPIC PERIODS 1. INTERNET FUNDAMENTALS & HTML Test 1 16 02 2. CSS & JAVASCRIPT Test

More information

How To Backup A Database On A Microsoft Powerpoint 3.5 (Mysqldump) On A Pcode (Mysql) On Your Pcode 3.3.5 On A Macbook Or Macbook (Powerpoint) On

How To Backup A Database On A Microsoft Powerpoint 3.5 (Mysqldump) On A Pcode (Mysql) On Your Pcode 3.3.5 On A Macbook Or Macbook (Powerpoint) On Backing Up and Restoring Your MySQL Database (2004-06-15) - Contributed by Vinu Thomas Do you need to change your web host or switch your database server? This is probably the only time when you really

More information

The following steps detail how to prepare your database.

The following steps detail how to prepare your database. Using databases in Second Life or Open Sim to enhance user experience Tom Connors, SciEthis Interactive 2012 Second Life and Open Sim each have a built in system for editing the virtual world that allows

More information

Application note: SQL@CHIP Connecting the IPC@CHIP to a Database

Application note: SQL@CHIP Connecting the IPC@CHIP to a Database Application note: SQL@CHIP Connecting the IPC@CHIP to a Database 1. Introduction This application note describes how to connect an IPC@CHIP to a database and exchange data between those. As there are no

More information

Google AdWords TM Conversion Tracking Guide

Google AdWords TM Conversion Tracking Guide Google AdWords TM Conversion Tracking Guide CONTENTS INTRODUCTION TO CONVERSION TRACKING...2 PRODUCT DESCRIPTION...2 OVERVIEW...2 DEFINITION OF TERMS...3 ADDING THE CODE SNIPPET...4 CONVERSION TRACKING

More information

CSCI110: Examination information.

CSCI110: Examination information. CSCI110: Examination information. The exam for CSCI110 will consist of short answer questions. Most of them will require a couple of sentences of explanation of a concept covered in lectures or practical

More information

Developing a Web Server Platform with SAPI Support for AJAX RPC using JSON

Developing a Web Server Platform with SAPI Support for AJAX RPC using JSON Revista Informatica Economică, nr. 4 (44)/2007 45 Developing a Web Server Platform with SAPI Support for AJAX RPC using JSON Iulian ILIE-NEMEDI, Bucharest, Romania, [email protected] Writing a custom web

More information

Ajax Design and Usability

Ajax Design and Usability Ajax Design and Usability William Hudson [email protected] www.syntagm.co.uk/design Ajax Design and Usability About Ajax Ajax in context How Ajax works How Ajax is different How Ajax is similar

More information

Short notes on webpage programming languages

Short notes on webpage programming languages Short notes on webpage programming languages What is HTML? HTML is a language for describing web pages. HTML stands for Hyper Text Markup Language HTML is a markup language A markup language is a set of

More information

An introduction to creating Web 2.0 applications in Rational Application Developer Version 8.0

An introduction to creating Web 2.0 applications in Rational Application Developer Version 8.0 An introduction to creating Web 2.0 applications in Rational Application Developer Version 8.0 September 2010 Copyright IBM Corporation 2010. 1 Overview Rational Application Developer, Version 8.0, contains

More information

CSCI110 Exercise 4: Database - MySQL

CSCI110 Exercise 4: Database - MySQL CSCI110 Exercise 4: Database - MySQL The exercise This exercise is to be completed in the laboratory and your completed work is to be shown to the laboratory tutor. The work should be done in week-8 but

More information

ConvincingMail.com Email Marketing Solution Manual. Contents

ConvincingMail.com Email Marketing Solution Manual. Contents 1 ConvincingMail.com Email Marketing Solution Manual Contents Overview 3 Welcome to ConvincingMail World 3 System Requirements 3 Server Requirements 3 Client Requirements 3 Edition differences 3 Which

More information

Ajax: A New Approach to Web Applications

Ajax: A New Approach to Web Applications 1 of 5 3/23/2007 1:37 PM Ajax: A New Approach to Web Applications by Jesse James Garrett February 18, 2005 If anything about current interaction design can be called glamorous, it s creating Web applications.

More information

Enabling AJAX in ASP.NET with No Code

Enabling AJAX in ASP.NET with No Code Enabling AJAX in ASP.NET with No Code telerik s r.a.d.ajax enables AJAX by simply dropping a control on a Web page, without otherwise modifying the application or writing a single line of code By Don Kiely

More information

Preface. Motivation for this Book

Preface. Motivation for this Book Preface Asynchronous JavaScript and XML (Ajax or AJAX) is a web technique to transfer XML data between a browser and a server asynchronously. Ajax is a web technique, not a technology. Ajax is based on

More information

LabVIEW Internet Toolkit User Guide

LabVIEW Internet Toolkit User Guide LabVIEW Internet Toolkit User Guide Version 6.0 Contents The LabVIEW Internet Toolkit provides you with the ability to incorporate Internet capabilities into VIs. You can use LabVIEW to work with XML documents,

More information

How To Write A Web Server In Javascript

How To Write A Web Server In Javascript LIBERATED: A fully in-browser client and server web application debug and test environment Derrell Lipman University of Massachusetts Lowell Overview of the Client/Server Environment Server Machine Client

More information

Web Design Technology

Web Design Technology Web Design Technology Terms Found in web design front end Found in web development back end Browsers Uses HTTP to communicate with Web Server Browser requests a html document Web Server sends a html document

More information

AJAX and JSON Lessons Learned. Jim Riecken, Senior Software Engineer, Blackboard Inc.

AJAX and JSON Lessons Learned. Jim Riecken, Senior Software Engineer, Blackboard Inc. AJAX and JSON Lessons Learned Jim Riecken, Senior Software Engineer, Blackboard Inc. About Me Jim Riecken Senior Software Engineer At Blackboard for 4 years. Work out of the Vancouver office. Working a

More information

THE CHALLENGE OF ADMINISTERING WEBSITES OR APPLICATIONS THAT REQUIRE 24/7 ACCESSIBILITY

THE CHALLENGE OF ADMINISTERING WEBSITES OR APPLICATIONS THAT REQUIRE 24/7 ACCESSIBILITY THE CHALLENGE OF ADMINISTERING WEBSITES OR APPLICATIONS THAT REQUIRE 24/7 ACCESSIBILITY As the constantly growing demands of businesses and organizations operating in a global economy cause an increased

More information

5. At the Windows Component panel, select the Internet Information Services (IIS) checkbox, and then hit Next.

5. At the Windows Component panel, select the Internet Information Services (IIS) checkbox, and then hit Next. Installing IIS on Windows XP 1. Start 2. Go to Control Panel 3. Go to Add or RemovePrograms 4. Go to Add/Remove Windows Components 5. At the Windows Component panel, select the Internet Information Services

More information

MySQL quick start guide

MySQL quick start guide R E S E L L E R S U P P O R T www.fasthosts.co.uk MySQL quick start guide This guide will help you: Add a MySQL database to your reseller account. Find your database. Add additional users. Use the MySQL

More information

Direct Mail Tutorial

Direct Mail Tutorial Direct Mail Tutorial Extension Key: direct_mail_tut Copyright 2000-2003, Marlies Cohen, This document is published under the Open Content License available from http://www.opencontent.org/opl.shtml

More information

Accessing External Databases from Mobile Applications

Accessing External Databases from Mobile Applications CENTER FOR CONVERGENCE AND EMERGING NETWORK TECHNOLOGIES CCENT Syracuse University TECHNICAL REPORT: T.R. 2014-003 Accessing External Databases from Mobile Applications Version 2.0 Authored by: Anirudh

More information

Project Zip Code. Version 13.0. CUNA s Powerful Grassroots Program. User Manual. Copyright 2012, All Rights Reserved

Project Zip Code. Version 13.0. CUNA s Powerful Grassroots Program. User Manual. Copyright 2012, All Rights Reserved Project Zip Code Version 13.0 CUNA s Powerful Grassroots Program User Manual Copyright 2012, All Rights Reserved Project Zip Code Version 13.0 Page 1 Table of Contents Topic Page About Project Zip Code

More information

Chapter 3: Web Paradigms and Interactivity

Chapter 3: Web Paradigms and Interactivity Chapter 3: Web Paradigms and Interactivity 3.1! AJAX: Asynchronous Interactivity in the Web! 3.2! Paradigms for Web-Based Communication! 3.3! Reverse AJAX and COMET! 3.4! Web Sockets and Web Messaging!

More information

Debugging JavaScript and CSS Using Firebug. Harman Goei CSCI 571 1/27/13

Debugging JavaScript and CSS Using Firebug. Harman Goei CSCI 571 1/27/13 Debugging JavaScript and CSS Using Firebug Harman Goei CSCI 571 1/27/13 Notice for Copying JavaScript Code from these Slides When copying any JavaScript code from these slides, the console might return

More information

Web development... the server side (of the force)

Web development... the server side (of the force) Web development... the server side (of the force) Fabien POULARD Document under license Creative Commons Attribution Share Alike 2.5 http://www.creativecommons.org/learnmore Web development... the server

More information

Ready, Set, Go Getting started with Tuscany

Ready, Set, Go Getting started with Tuscany Ready, Set, Go Getting started with Tuscany Install the Tuscany Distribution The first thing you do is to create a folder on you disk into which you will download the TUSCANY distribution. Next you download

More information

Advanced Web Development SCOPE OF WEB DEVELOPMENT INDUSTRY

Advanced Web Development SCOPE OF WEB DEVELOPMENT INDUSTRY Advanced Web Development Duration: 6 Months SCOPE OF WEB DEVELOPMENT INDUSTRY Web development jobs have taken thе hot seat when it comes to career opportunities and positions as a Web developer, as every

More information

SerialMailer Manual. For SerialMailer 7.2. Copyright 2010-2011 Falko Axmann. All rights reserved.

SerialMailer Manual. For SerialMailer 7.2. Copyright 2010-2011 Falko Axmann. All rights reserved. 1 SerialMailer Manual For SerialMailer 7.2 Copyright 2010-2011 Falko Axmann. All rights reserved. 2 Contents 1 Getting Started 4 1.1 Configuring SerialMailer 4 1.2 Your First Serial Mail 7 1.2.1 Database

More information

Adding Panoramas to Google Maps Using Ajax

Adding Panoramas to Google Maps Using Ajax Adding Panoramas to Google Maps Using Ajax Derek Bradley Department of Computer Science University of British Columbia Abstract This project is an implementation of an Ajax web application. AJAX is a new

More information

Exploiting Web 2.0 Next Generation Vulnerabilities

Exploiting Web 2.0 Next Generation Vulnerabilities Exploiting Web 2.0 Next Generation Vulnerabilities OWASP EU09 Poland Shreeraj Shah Chapter Lead Founder & Director Blueinfy Solutions [email protected] Copyright The OWASP Foundation Permission is

More information

Cyber Security Challenge Australia 2014

Cyber Security Challenge Australia 2014 Cyber Security Challenge Australia 2014 www.cyberchallenge.com.au CySCA2014 Web Penetration Testing Writeup Background: Pentest the web server that is hosted in the environment at www.fortcerts.cysca Web

More information

Novell Identity Manager

Novell Identity Manager AUTHORIZED DOCUMENTATION Manual Task Service Driver Implementation Guide Novell Identity Manager 4.0.1 April 15, 2011 www.novell.com Legal Notices Novell, Inc. makes no representations or warranties with

More information

PROJECT MANAGEMENT SYSTEM

PROJECT MANAGEMENT SYSTEM Requirement Analysis Document v.2 14.12.2009 CENG-401 SOFTWARE ENGINEER PROJECT MANAGEMENT SYSTEM (Project Manager) Ahmet Edip SEÇKİN 07010555 (Developer) Erhan ŞEN 07010507 (Developer) Semih Serdar CENGİZOĞLU

More information

1. Introduction. 2. Web Application. 3. Components. 4. Common Vulnerabilities. 5. Improving security in Web applications

1. Introduction. 2. Web Application. 3. Components. 4. Common Vulnerabilities. 5. Improving security in Web applications 1. Introduction 2. Web Application 3. Components 4. Common Vulnerabilities 5. Improving security in Web applications 2 What does World Wide Web security mean? Webmasters=> confidence that their site won

More information

Example for Using the PrestaShop Web Service : CRUD

Example for Using the PrestaShop Web Service : CRUD Example for Using the PrestaShop Web Service : CRUD This tutorial shows you how to use the PrestaShop web service with PHP library by creating a "CRUD". Prerequisites: - PrestaShop 1.4 installed on a server

More information

AD Phonebook 2.2. Installation and configuration. Dovestones Software

AD Phonebook 2.2. Installation and configuration. Dovestones Software AD Phonebook 2.2 Installation and configuration 1 Table of Contents Introduction... 3 AD Self Update... 3 Technical Support... 3 Prerequisites... 3 Installation... 3 Adding a service account and domain

More information

Web Development. Owen Sacco. ICS2205/ICS2230 Web Intelligence

Web Development. Owen Sacco. ICS2205/ICS2230 Web Intelligence Web Development Owen Sacco ICS2205/ICS2230 Web Intelligence Brief Course Overview An introduction to Web development Server-side Scripting Web Servers PHP Client-side Scripting HTML & CSS JavaScript &

More information

Database Forms and Reports Tutorial

Database Forms and Reports Tutorial Database Forms and Reports Tutorial Contents Introduction... 1 What you will learn in this tutorial... 2 Lesson 1: Create First Form Using Wizard... 3 Lesson 2: Design the Second Form... 9 Add Components

More information

Lesson 7 - Website Administration

Lesson 7 - Website Administration Lesson 7 - Website Administration If you are hired as a web designer, your client will most likely expect you do more than just create their website. They will expect you to also know how to get their

More information

MiraCosta College now offers two ways to access your student virtual desktop.

MiraCosta College now offers two ways to access your student virtual desktop. MiraCosta College now offers two ways to access your student virtual desktop. We now feature the new VMware Horizon View HTML access option available from https://view.miracosta.edu. MiraCosta recommends

More information

AJAX The Future of Web Development?

AJAX The Future of Web Development? AJAX The Future of Web Development? Anders Moberg (dit02amg), David Mörtsell (dit01dml) and David Södermark (dv02sdd). Assignment 2 in New Media D, Department of Computing Science, Umeå University. 2006-04-28

More information

Web application Architecture

Web application Architecture 2014 Cesare Pautasso 1 / 29 Very Thin Client 6 / 29 AJAX Input/ Output Prof. Cesare Pautasso http://www.pautasso.info [email protected] Client/Server 7 / 29 @pautasso 5 / 29 Web application Architecture

More information

Livezilla How to Install on Shared Hosting http://www.jonathanmanning.com By: Jon Manning

Livezilla How to Install on Shared Hosting http://www.jonathanmanning.com By: Jon Manning Livezilla How to Install on Shared Hosting By: Jon Manning This is an easy to follow tutorial on how to install Livezilla 3.2.0.2 live chat program on a linux shared hosting server using cpanel, linux

More information

Distance Examination using Ajax to Reduce Web Server Load and Student s Data Transfer

Distance Examination using Ajax to Reduce Web Server Load and Student s Data Transfer Distance Examination using Ajax to Reduce Web Server Load and Student s Data Transfer Distance Examination using Ajax to Reduce Web Server Load and Student s Data Transfer Ridwan Sanjaya Soegijapranata

More information

A Tool for Evaluation and Optimization of Web Application Performance

A Tool for Evaluation and Optimization of Web Application Performance A Tool for Evaluation and Optimization of Web Application Performance Tomáš Černý 1 [email protected] Michael J. Donahoo 2 [email protected] Abstract: One of the main goals of web application

More information

Quick Reference Guide: Shared Hosting

Quick Reference Guide: Shared Hosting : Shared Hosting TABLE OF CONTENTS GENERAL INFORMATION...2 WEB SERVER PLATFORM SPECIFIC INFORMATION...2 WEBSITE TRAFFIC ANALYSIS TOOLS...3 DETAILED STEPS ON HOW TO PUBLISH YOUR WEBSITE...6 FREQUENTLY ASKED

More information

How To Install Amyshelf On Windows 2000 Or Later

How To Install Amyshelf On Windows 2000 Or Later Contents I Table of Contents Part I Document Overview 2 Part II Document Details 3 Part III Setup 4 1 Download & Installation... 4 2 Configure MySQL... Server 6 Windows XP... Firewall Settings 13 3 Additional

More information

Step One Check for Internet Connection

Step One Check for Internet Connection Connecting to Websites Programmatically with Android Brent Ward Hello! My name is Brent Ward, and I am one of the three developers of HU Pal. HU Pal is an application we developed for Android phones which

More information

GRICdial User's Guide

GRICdial User's Guide GRICdial User's Guide Table of Contents System Requirements Getting Connected Additional Settings Main Menu Functions Setting up Proxy FAQ System Requirements For Windows 95 You should have the following

More information

Advanced Tornado TWENTYONE. 21.1 Advanced Tornado. 21.2 Accessing MySQL from Python LAB

Advanced Tornado TWENTYONE. 21.1 Advanced Tornado. 21.2 Accessing MySQL from Python LAB 21.1 Advanced Tornado Advanced Tornado One of the main reasons we might want to use a web framework like Tornado is that they hide a lot of the boilerplate stuff that we don t really care about, like escaping

More information

MySQL Quick Start Guide

MySQL Quick Start Guide Fasthosts Customer Support MySQL Quick Start Guide This guide will help you: Add a MySQL database to your account. Find your database. Add additional users. Use the MySQL command-line tools through ssh.

More information

PHP Tutorial From beginner to master

PHP Tutorial From beginner to master PHP Tutorial From beginner to master PHP is a powerful tool for making dynamic and interactive Web pages. PHP is the widely-used, free, and efficient alternative to competitors such as Microsoft's ASP.

More information

XML Processing and Web Services. Chapter 17

XML Processing and Web Services. Chapter 17 XML Processing and Web Services Chapter 17 Textbook to be published by Pearson Ed 2015 in early Pearson 2014 Fundamentals of http://www.funwebdev.com Web Development Objectives 1 XML Overview 2 XML Processing

More information

Web Hosting Features. Small Office Premium. Small Office. Basic Premium. Enterprise. Basic. General

Web Hosting Features. Small Office Premium. Small Office. Basic Premium. Enterprise. Basic. General General Basic Basic Small Office Small Office Enterprise Enterprise RAID Web Storage 200 MB 1.5 MB 3 GB 6 GB 12 GB 42 GB Web Transfer Limit 36 GB 192 GB 288 GB 480 GB 960 GB 1200 GB Mail boxes 0 23 30

More information

Content Management System User Guide

Content Management System User Guide Content Management System User Guide support@ 07 3102 3155 Logging in: Navigate to your website. Find Login or Admin on your site and enter your details. If there is no Login or Admin area visible select

More information

Other Language Types CMSC 330: Organization of Programming Languages

Other Language Types CMSC 330: Organization of Programming Languages Other Language Types CMSC 330: Organization of Programming Languages Markup and Query Languages Markup languages Set of annotations to text Query languages Make queries to databases & information systems

More information

1 Email2DB Introduction

1 Email2DB Introduction 1 Email2DB Introduction Email2DB is a message parser and message automation solution. Use it to parse and extract data from email and other messages to integrate with your business data and send autoresponses.

More information

1.264 Lecture 19 Web database: Forms and controls

1.264 Lecture 19 Web database: Forms and controls 1.264 Lecture 19 Web database: Forms and controls We continue using Web site Lecture18 in this lecture Next class: ASP.NET book, chapters 11-12. Exercises due after class 1 Forms Web server and its pages

More information

How To Test Your Web Site On Wapt On A Pc Or Mac Or Mac (Or Mac) On A Mac Or Ipad Or Ipa (Or Ipa) On Pc Or Ipam (Or Pc Or Pc) On An Ip

How To Test Your Web Site On Wapt On A Pc Or Mac Or Mac (Or Mac) On A Mac Or Ipad Or Ipa (Or Ipa) On Pc Or Ipam (Or Pc Or Pc) On An Ip Load testing with WAPT: Quick Start Guide This document describes step by step how to create a simple typical test for a web application, execute it and interpret the results. A brief insight is provided

More information

PHP on IBM i: What s New with Zend Server 5 for IBM i

PHP on IBM i: What s New with Zend Server 5 for IBM i PHP on IBM i: What s New with Zend Server 5 for IBM i Mike Pavlak Solutions Consultant [email protected] (815) 722 3454 Function Junction Audience Used PHP in Zend Core/Platform New to Zend PHP Looking to

More information

Modern Web Application Framework Python, SQL Alchemy, Jinja2 & Flask

Modern Web Application Framework Python, SQL Alchemy, Jinja2 & Flask Modern Web Application Framework Python, SQL Alchemy, Jinja2 & Flask Devert Alexandre December 29, 2012 Slide 1/62 Table of Contents 1 Model-View-Controller 2 Flask 3 First steps 4 Routing 5 Templates

More information

IAS Web Development using Dreamweaver CS4

IAS Web Development using Dreamweaver CS4 IAS Web Development using Dreamweaver CS4 Information Technology Group Institute for Advanced Study Einstein Drive Princeton, NJ 08540 609 734 8044 * [email protected] Information Technology Group [2] Institute

More information

Getting Started Guide with WIZ550web

Getting Started Guide with WIZ550web 1/21 WIZ550web is an embedded Web server module based on WIZnet s W5500 hardwired TCP/IP chip, Users can control & monitor the 16-configurable digital I/O and 4-ADC inputs on module via web pages. WIZ550web

More information

Xtreeme Search Engine Studio Help. 2007 Xtreeme

Xtreeme Search Engine Studio Help. 2007 Xtreeme Xtreeme Search Engine Studio Help 2007 Xtreeme I Search Engine Studio Help Table of Contents Part I Introduction 2 Part II Requirements 4 Part III Features 7 Part IV Quick Start Tutorials 9 1 Steps to

More information

Web Development Guide. Information Systems

Web Development Guide. Information Systems Web Development Guide Information Systems Gabriel Malveaux May 2013 Web Development Guide Getting Started In order to get started with your web development, you will need some basic software. In this guide

More information

Portals and Hosted Files

Portals and Hosted Files 12 Portals and Hosted Files This chapter introduces Progress Rollbase Portals, portal pages, portal visitors setup and management, portal access control and login/authentication and recommended guidelines

More information

Maldives Pension Administration Office Republic of Maldives

Maldives Pension Administration Office Republic of Maldives A. Background Maldives Pension Administration Office Republic of Maldives Pension and Social Protection Administration Project IDA Credit.: 4611-MV Date: 01 June 2014 Design and Development of the CMDA

More information

EECS 398 Project 2: Classic Web Vulnerabilities

EECS 398 Project 2: Classic Web Vulnerabilities EECS 398 Project 2: Classic Web Vulnerabilities Revision History 3.0 (October 27, 2009) Revise CSRF attacks 1 and 2 to make them possible to complete within the constraints of the project. Clarify that

More information

Kaldeera Workflow Designer 2010 User's Guide

Kaldeera Workflow Designer 2010 User's Guide Kaldeera Workflow Designer 2010 User's Guide Version 1.0 Generated May 18, 2011 Index 1 Chapter 1: Using Kaldeera Workflow Designer 2010... 3 1.1 Getting Started with Kaldeera... 3 1.2 Importing and exporting

More information

IceWarp to IceWarp Server Migration

IceWarp to IceWarp Server Migration IceWarp to IceWarp Server Migration Registered Trademarks iphone, ipad, Mac, OS X are trademarks of Apple Inc., registered in the U.S. and other countries. Microsoft, Windows, Outlook and Windows Phone

More information