Copyrighted Material

Total Page:16

File Type:pdf, Size:1020Kb

Copyrighted Material 15_043067 bindex.qxd 6/15/06 7:38 PM Page 330 INDEX accessing XML on server, 172–173 A downloading and installing, 170–171, 176 absolute positioning, 288–289 downloading XML data, 174–175 add function, 40–41 stripping out whitespace, 172, 173, 174 addition function for XML data extraction, 82–83 URL encoding, 171 addition operator (+) (JavaScript), 40, 44, 45 alert boxes Ajax (Asynchronous JavaScript + XML). See also Ajax display by JavaScript function, 30–31 XMLHttpRequest frameworks; object displaying, 28–29 advantages, 2, 3, 62 displaying text from text fields, 37 attributes, 29, 262–263 aligning text in CSS, 278–279 downloading JavaScript, 94–95 AND logical operator (JavaScript), 53 event attributes, 29 anonymous JavaScript functions, 68 example of data Submit and fetch, 4–5 Apache Tomcat Java-based server, 231 XMLHttpRequest importance of object, 62 Apple Safari, 63 server-side scripts and PHP used with, 76–77 arguments, passing to functions, 38–39 Ajax frameworks arithmetic operators (JavaScript), 45 ! caution: importance of files and placement, 152 assignment operators (JavaScript), 44, 45 resultXML ! caution: naming global variable “ ”, 171, 175 asynchronous versus synchronous requests, ! caution: on use of global variables, 155, 159 178, 180 advantages, 152–153 attributes (Ajax), 29, 262–263 Ajax tag library, 236–239 autocomplete capability AJAXLib Ajax framework, 170–175 example demonstration site, 8–9 browser-based versus server-side, 152 support for, in Ajax tag library, 236–237 downloadable and free, 182 installing and allowing access, 152–153 IWF (Interactive Website Framework), 200–205 B JavaScript and server-side, 11, 152 background color setting in CSS, 284–285 LibAjax server-side Ajax framework, 224–229 background image setting in CSS, 286–287 libXmlRequest Ajax framework, 176–181 binary objects, 23, 140 reading text with GET method, 154–157 block elements in HTML, 278 reading text with POST method, 162–163, 164–165 boldface, 24, 276–277 reading XML from server, 158–159, 160–161, 166–167, broadcasts with instant messaging, 21 168–169 browser events, 28–29, 34–35 SACK Ajax framework, 188–193 browsers SAJAX server-side Ajax framework, 212–217 ! caution: ignoring visibility style property, 292 Sarissa Ajax framework, 194–197 ! caution: on avoiding caching at URL, 177, 200 sending to server with URL encoding, 155, 157, 159, 161 ! caution: on passing JavaScript to, 95 Xajax server-side Ajax framework,COPYRIGHTED 218–223 accessing MATERIAL different domains, 118–119 XHConn Ajax framework, 182–187 checking before creating XMLHttpRequest object, Ajax tag library 64–65 returning data from server, 239 determining type and version, 54–55, 259 support for autocomplete, 236–237 downloading images, text, or XML, 22–23 support for callouts, pop-ups, 237 instant messaging with, 21 updating HTML controls, 238–239 problems of display refresh, 2, 4, 10, 18 updating one field from results of another, 237 viewing JavaScript errors, 26–27 AJAXLib Ajax framework ! caution: on lack of built-in error handling, 175 ! caution: on use of global variable resultXML, 171, 175 330 15_043067 bindex.qxd 6/15/06 7:38 PM Page 331 dialog boxes as alert boxes, 28–29 C Direct Web Remoting (DWR). See DWR (Direct Web calculator example (JavaScript operators), 45–47 Remoting) callback functions, 154 directories calling JavaScript functions, 30–31 for data for server-side scripts, 76, 77 callouts and pop-ups, Ajax tag library, 237 importance of Ajax framework file placement, 152, 153 capitalization of JavaScript variables, 43 indicating parent, 73 centering text in CSS, 278–279 displayText() function, 36–37, 38–39 centimeters as units of measurement, 289 do while loops (JavaScript), 61 check box creation and reading, 316–317 document objects (JavaScript), 24 childNodes and siblingNodes properties (JavaScript), document.getElementById(‘targetDiv’).inner 245, 248–251 HTML expression, 33, 42 clicks. See also mouse events document.getElementById(‘text1’) expression, browser events, 28–29, 34–35 36, 37 colors documents background, setting in CSS, 284–285 analyzing and extracting header information, 108–109 foreground, setting in CSS, 280–281 checking existence and accessibility, 110–111 commas (,) separating arguments, 39 document.write method, 24, 32 commenting domains, accessing, 118–119 HTML, 25 download time penalty, 2 JavaScript, 25 downloadable code for this book comparison operators (JavaScript), 45, 52–53, 137 ajaxframework.js sample Ajax framework, 160, 164 CSS (Cascading Style Sheets) movie.jpg, 92 ! caution: use absolute positioning, 147 drag and drop advantages, 10, 270 avoiding multiple-page shopping, 12–13 aligning text, 278–279 handling mouse down and up events, 124–125 background color settings, 284–285 with RICO JavaScript framework, 206–207 boldfacing text, 276–277 support by IWF (Interactive Website Framework), 201 creating pop-ups, 294–295 driving directions from Google Maps, 17 creating style rules, 270–271 drop-down menus. See menu systems displaying menu systems, 144, 146–147 DWR (Direct Web Remoting) foreground color settings, 280–281 downloading and installing, 230 hiding menu systems, 148–149 editing interactive HTML table, 232–233 moving HTML elements, 296–297 requiring Java-enabled Web server, 230 overlapping HTML elements, 298–299 dynamic HTML. See also HTML positioning elements using absolute positioning, 288–289 display of updated elements, 10 positioning elements using relative positioning, 290–291 downloading images and other binary objects, 22–23, setting font family and size, 272–273 140–141 setting HTML element visibility, 292–293 positioning text and images, 32–33 specifying styles for HTML elements, 271 underlining or italicizing text, 274–275 E curly braces ({}) e-mail handling with Echo2, 234–235 for code handling downloaded data, 68 Echo2 Java framework, 234–235, 235 enclosing JavaScript functions, 30 else clause of if statements (JavaScript), 51 encodeURI function (JavaScript), 89, 99 D error handling. See also security considerations debugging. See error handling ! caution: on absence from AJAXLib, 175 decrement operators (JavaScript), 44, 45 ! caution: on absence from XHConn, 187 331 15_043067 bindex.qxd 6/15/06 7:38 PM Page 332 INDEX accessing different domains, 118–119 forward slashes (//) advantages of small JavaScript files, 27 for commenting JavaScript, 25 Ajax using Firefox browser, 120–121 functions avoiding server-side accesses, 105 callback, 154 in case of missing document or PHP script, 111 creating JavaScript, 30–31 in cases of multiple responses to XMLHttpRequest definition, 24, 30 object, 113 inner, 116 common HTTP errors, 69 passing arguments to, 38–39 displaying customized error messages, 269 returning data from, 40–41 exception objects (JavaScript), 75 unlimited lines of code, 31 importance of download status and error checking, 83, 84 JavaScript using browser, 26–27 G reading input and validating via server, 102–105 games online, 18–19, 131 XML documents with Internet Explorer, 241, 242–243, GET method 268–269 compared to POST method, 162, 163, 166, 167 XMLHttpRequest objects with script, 120 passing data to server-side scripts, 88–89 eval function (JavaScript), 94 reading or passing type parameter, 86–87 events. See also mouse events URL-encoding of data, 67 browser, 28 getAllResponseHeaders method, 106, 107 button clicks for execution of JavaScript code, 34 getData function, 66, 67, 70, 72 common attributes in Ajax applications, 29 getElementByI method, 33, 36 exception objects (JavaScript), 75 getElementsByTagName method (JavaScript), 82, 247, Extensible Hypertext Markup Language (XHTML). See 260–261 XML getResponseHeader method, 108–109 global JavaScript variables, 48–49 F ! caution: on use of, 155, 159 Google as Ajax-enabled site, 7 file handles, 328 Google Maps, 16–17 Firefox Google Search debugging capability, 26, 27, 120–121 example of live search, 6–7 determining presence and version, 54–55 Google Suggest, 6, 7 disconnecting mouse events from JavaScript, 136 connecting to, 98–99 Greasemonkey, 120, 121 creating JavaScript, 100 methods and properties for XMLHttpRequest object, 63 displaying search results, 100–101 mouse event handling, 122, 124, 126, 128, 130 Greasemonkey (Firefox), 120, 121 mouse listener functions, 134 greater than/less than operators (> <) (JavaScript), 52 predefined colors for text, 280 selecting Google as home page, 7 H specifying italics, 274 HEAD request, 106–107, 110 font header information font-weight property in CSS, 276 analysis and extraction of specifics, 108–109 formatting size or bold, 24 retrieval, 106–107 formatting with CSS style rules, 270–283 HTML. See also dynamic HTML Fonz and Ajax, 19 adding + and - buttons for calculator, 47 for loops, 56–57, 58 block elements, 278 foreground colors, setting in CSS, 280–281 coding JavaScript in script element, 24–25 <form> elements, 34–35 332 15_043067 bindex.qxd 6/15/06 7:38 PM Page 333 commenting, 25 predefined colors for text, 280 controls updates with Ajax tag library, 238–239 selecting Google as home page, 7 event attributes, 28 specifying italics, 274 in PHP scripts, 77 support of marquee element, 54 reading controls data, 87 tests for XML documents, 242–243 HTML elements. See also SACK Ajax framework; shopping italics for text cart application specifying in CSS, 274–275 form for enclosure of controls, 34–35 IWF (Interactive Website Framework) absolute positioning, 288–289 avoiding return of cached data, 200 hiding, 293 connecting to server, 202–203 as JavaScript objects, 33 downloading and installing,
Recommended publications
  • Javascript Hijacking Brian Chess, Yekaterina Tsipenyuk O'neil, Jacob West
    JavaScript Hijacking Brian Chess, Yekaterina Tsipenyuk O'Neil, Jacob West March 12, 2007 Summary An increasing number of rich Web applications, often called AJAX applications, make use of JavaScript as a data transport mechanism. This paper describes a vulnerability we term JavaScript Hijacking, which allows an unauthorized party to read sensitive data contained in JavaScript messages. The attack works by using a <script> tag to circumvent the Same Origin Policy enforced by Web browsers. Traditional Web applications are not vulnerable because they do not use JavaScript as a data transport mechanism. We analyzed the 12 most popular AJAX frameworks, including 4 server-integrated toolkits – Direct Web Remoting (DWR), Microsoft ASP.NET AJAX (a.k.a. Atlas), XAJAX and Google Web Toolkit (GWT) -- and 8 purely client-side libraries -- Prototype, Script.aculo.us, Dojo, Moo.fx, jQuery, Yahoo! UI, Rico, and MochiKit. We determined that among them only DWR 2.0 implements mechanisms for preventing JavaScript Hijacking. The rest of the frameworks do not explicitly provide any protection and do not mention any security concerns in their documentation. Many programmers are not using any of these frameworks, but based on our findings with the frameworks, we believe that many custom-built applications are also vulnerable. An application may be vulnerable if it: • Uses JavaScript as a data transfer format • Handles sensitive data We advocate a two-pronged mitigation approach that allows applications to decline malicious requests and prevent attackers from directly executing JavaScript the applications generate. 1. Introduction1 Although the term “Web 2.0” does not have a rigorous definition, it is commonly used in at least two ways.
    [Show full text]
  • Ajax for Dummies (2006).Pdf
    01_785970 ffirs.qxp 1/20/06 10:51 AM Page iii Ajax FOR DUMmIES‰ by Steve Holzner, PhD 01_785970 ffirs.qxp 1/20/06 10:51 AM Page ii 01_785970 ffirs.qxp 1/20/06 10:51 AM Page i Ajax FOR DUMmIES‰ 01_785970 ffirs.qxp 1/20/06 10:51 AM Page ii 01_785970 ffirs.qxp 1/20/06 10:51 AM Page iii Ajax FOR DUMmIES‰ by Steve Holzner, PhD 01_785970 ffirs.qxp 1/20/06 10:51 AM Page iv Ajax For Dummies® Published by Wiley Publishing, Inc. 111 River Street Hoboken, NJ 07030-5774 www.wiley.com Copyright © 2006 by Wiley Publishing, Inc., Indianapolis, Indiana Published by Wiley Publishing, Inc., Indianapolis, Indiana Published simultaneously in Canada No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permit- ted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permission should be addressed to the Legal Department, Wiley Publishing, Inc., 10475 Crosspoint Blvd., Indianapolis, IN 46256, (317) 572-3447, fax (317) 572-4355, or online at http://www.wiley.com/go/permissions. Trademarks: Wiley, the Wiley Publishing logo, For Dummies, the Dummies Man logo, A Reference for the Rest of Us!, The Dummies Way, Dummies Daily, The Fun and Easy Way, Dummies.com, and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc.
    [Show full text]
  • Javascript Hijacking
    JavaScript Hijacking Brian Chess, Yekaterina Tsipenyuk O'Neil, Jacob West {brian, katrina, jacob}@fortifysoftware.com March 12, 2007 Summary An increasing number of rich Web applications, often called Ajax applications, make use of JavaScript as a data transport mechanism. This paper describes a vulnerability we term JavaScript Hijacking, which allows an unauthorized party to read confidential data contained in JavaScript messages. The attack works by using a <script> tag to circumvent the Same Origin Policy enforced by Web browsers. Traditional Web applications are not vulnerable because they do not use JavaScript as a data transport mechanism. We analyzed 12 popular Ajax frameworks, including 4 server-integrated toolkits – Direct Web Remoting (DWR), Microsoft ASP.NET Ajax (a.k.a. Atlas), xajax and Google Web Toolkit (GWT) -- and 8 purely client-side libraries -- Prototype, Script.aculo.us, Dojo, Moo.fx, jQuery, Yahoo! UI, Rico, and MochiKit. We determined that among them only DWR 2.0 implements mechanisms for preventing JavaScript Hijacking. The rest of the frameworks do not explicitly provide any protection and do not mention any security concerns in their documentation. Many programmers are not using any of these frameworks, but based on our findings with the frameworks, we believe that many custom-built applications are also vulnerable. An application may be vulnerable if it: • Uses JavaScript as a data transfer format • Handles confidential data We advocate a two-pronged mitigation approach that allows applications to decline malicious requests and prevent attackers from directly executing JavaScript the applications generate. 1. Introduction Although the term “Web 2.0” does not have a rigorous definition, it is commonly used in at least two ways.
    [Show full text]
  • Ajax, State of The
    AjAjaax,x, ststaattee ooff tthhee aarrtt Tarek Ziadé, Nuxeo [email protected] WWhhoo aamm ii ● I am engineer at Nuxeo ● I work on CPS, the famous ECM Plateform ;) ● I©ve been lately in charge of Ajax stuff in CPS ● I read Ajax related feeds before I go to bed WWhhaatt iiss AAjjaaxx ?? A dutch football club (a good one) A cleanser (really works) AA WWeebb 22..00 tteechchnnoollooggyy Asynchronous Javascript And XML WWhhaatt©©ss WWeebb 22..00 ?? TTiimm OO©©RReeiillllyy©©ss ©©ccoommppaacctt©© ddeeffiinniittiioonn:: Web 2.0 is the network as platform, spanning all connected devices; Web 2.0 applications are those that make the most of the intrinsic advantages of that platform: delivering software as a continually-updated service that gets better the more people use it, consuming and remixing data from multiple sources, including individual users, while providing their own data and services in a form that allows remixing by others, creating network effects through an "architecture of participation," and going beyond the page metaphor of Web 1.0 to deliver rich user experiences. MMaarrkkuuss AAnnggeerrmmeeiieerr©©ss vviieeww ooff WWeebb 22..00:: (courtesy of Markus Angermeier) WWeebb 22..00 AAppppss ✔ del.icio.us ✔ flickr ✔ Voo2do ✔ Digg ✔ Google Mail (Gmail) ✔ Writely ✔ Basecamp ✔ ... AjAjaaxx bbiigg ppiictctuurere 11//22 (courtesy of J. J. Garett) AjAjaaxx bbiigg ppiictctuurere 22//22 (courtesy of J. J. Garett) TThhee LLiistst ooff tthhiinnggss AjAjaaxx rereaallllyy bbririnnggss ✔ Increases interactivity ✔ Save bandwidth ✔ Helps avoiding some interactive
    [Show full text]
  • Integrating AJAX Approach Into GIS Visualization Web Services
    Integrating AJAX Approach into GIS Visualization Web Services Ahmet Sayar1, 2, *, Marlon Pierce1 and Geoffrey Fox 1, 2, 3, 4 1 Community Grids Lab, Indiana University, Bloomington, Indiana, 47404, USA 2Department of Computer Science, Indiana University 3Department of Physics, Indiana University 4School of Informatics, Indiana University {asayar, mpierce, gcf}@cs.indiana.edu Abstract XML and HTTP as AJAX does. Since AJAX and Web Services are XML based structures they are able to As the Web platform continues to mature, we see an leverage each others strength. increasing number of amazing technologies that take Geographic Information Systems (GIS) visualization In this paper, we first give some background applications to new levels of power and usability. By information about the web technologies we have been integrating new powerful technologies into GIS using in our proposed architecture. These are basically systems, we get higher performance results with AJAX, Web Services, and GIS Web Services. In additional functionalities. The most recent Section 3 we mention some related works about the development capturing the attention of the browser AJAX and Web Services. In Section 4 we first give a based application developers is AJAX (Asynchronous generic architecture for integration of any Web JavaScript and XML). In this paper we present a Services and AJAX. Then, we give sample usage generic and performance efficient framework for scenarios to prove our integration concepts; one of integrating AJAX models into the browser based GIS them is for Google and GIS Data Server (WFS) Visualization Web Services systems. integration and the other one is for Google and GIS Mapping Server (WMS) integration.
    [Show full text]
  • Mastering Ajax, Part 1: Introduction to Ajax Understanding Ajax, a Productive Approach to Building Web Sites, and How It Works
    Mastering Ajax, Part 1: Introduction to Ajax Understanding Ajax, a productive approach to building Web sites, and how it works Skill Level: Introductory Brett McLaughlin ([email protected]) Author and Editor O'Reilly Media Inc. 06 Dec 2005 Ajax, which consists of HTML, JavaScript™ technology, DHTML, and DOM, is an outstanding approach that helps you transform clunky Web interfaces into interactive Ajax applications. The author, an Ajax expert, demonstrates how these technologies work together -- from an overview to a detailed look -- to make extremely efficient Web development an easy reality. He also unveils the central concepts of Ajax, including the XMLHttpRequest object. Five years ago, if you didn't know XML, you were the ugly duckling whom nobody talked to. Eighteen months ago, Ruby came into the limelight and programmers who didn't know what was going on with Ruby weren't welcome at the water cooler. Today, if you want to get into the latest technology rage, Ajax is where it's at. However, Ajax is far more than just a fad; it's a powerful approach to building Web sites and it's not nearly as hard to learn as an entire new language. Before I dig into what Ajax is, though, let's spend just a few moments understanding what Ajax does. When you write an application today, you have two basic choices: • Desktop applications • Web applications These are both familiar; desktop applications usually come on a CD (or sometimes are downloaded from a Web site) and install completely on your computer. They Introduction to Ajax © Copyright IBM Corporation 1994, 2008.
    [Show full text]
  • The Web 2.0 Demystified – Six Theses on a Misinterpreted Concept
    Chapter 4 – Applications and Impacts The Web 2.0 Demystified – Six Theses on a Misinterpreted Concept H.D.Hofmann1 and M.H.Knahl2 1University of Cooperative Education, Mannheim, Germany 2Centre for Information Security and Network Research, University of Plymouth, United Kingdom e-mail: [email protected], [email protected] Abstract The Web 2.0 was said to bring real innovation, new concepts, and new applications to the Web. The role of a user is upgraded by changing his passive role of information consumer to the role of somebody producing and consuming information at the same time ("prosumer"). In our paper, we discuss the major aspects of the concept Web 2.0 and draw conclusions from our findings by means of theses. It is argued that technologies used with Web 2.0 do not represent an innovative factor. We discuss technical aspects such as technologies and programming interfaces as well as usability aspects and business aspects of Web 2.0 applications and give an outlook to future developments and new concepts used on the Web. Based on the derived theses it is proposed that the Web 3.0 will bring new concepts and applications to the web rather than the Web 2.0. Keywords Web 2.0, Web 3.0, Internet Applications, AJAX 1. Web 2.0 - old wine in new skins? The past 10-15 have seen a rapid development and adoption of Internet services. Business managers have been enthused but also alarmed by a rapidly proliferating series of developments to the internet and web based services that alter consumer behaviour and have the potential to transform business models (Cassidy, 2002; Tapscott and Williams, 2007).
    [Show full text]
  • Ingeniería Del Software II: AJAX Vs Silverlight
    Ingeniería del Software II: AJAX vs Silverlight Diego Martín-Serrano Fernández Francisco José Oteo Fernández Jesús Martínez-Campos Martínez Índice 1. Introducción a Ajax...............................................................................................................3 2. Profundizando en Ajax.........................................................................................................4 2.1. Frameworks para desarrollo Ajax.....................................................................................5 3. Conclusión sobre Ajax.........................................................................................................6 4. Introducción a Silverlight......................................................................................................7 5. Profundizando en Silverlight................................................................................................8 6. Conclusión sobre Silverlight..............................................................................................10 7. Comparativa Ajax vs Silverlight..........................................................................................11 8. Bibliografía..........................................................................................................................14 Índice de tablas Tabla 1. Posibles valores del atributo readyState del objeto XMLHTTPRequest....................4 Tabla 2. Frameworks para el lado del servidor, según el lenguaje de programación.............6 Tabla 3. Comparativa características
    [Show full text]
  • Using Ajax with PHP and Sajax How the Simple Ajax Toolkit Can Integrate Your Server-Side PHP with Javascript
    Using Ajax with PHP and Sajax How the Simple Ajax Toolkit can integrate your server-side PHP with JavaScript Skill Level: Intermediate Tyler Anderson ([email protected]) Freelance Writer Stexar Corp. 18 Oct 2005 Updated 05 Jul 2006 For years, the goal of creating a truly responsive Web application was hampered by one simple fact of Web development: To change the information on part of a page, a user must reload the entire page. Not anymore. Thanks to asynchronous JavaScript and XML (Ajax), we can now request new content from the server and change just part of a page. This tutorial explains how to use Ajax with PHP and introduces the Simple Ajax Toolkit (Sajax), a tool written in PHP that lets you integrate server-side PHP with JavaScript that makes this work. Section 1. Before you start This tutorial is for those interested in developing rich Web applications that dynamically update content using asynchronous JavaScript and XML (Ajax) with PHP, without having to refresh entire Web pages with each user click. This tutorial assumes basic PHP concepts, including the use of if and switch statements, and functions. About this tutorial Using Ajax with PHP and Sajax © Copyright IBM Corporation 1994, 2008. All rights reserved. Page 1 of 25 developerWorks® ibm.com/developerWorks You will learn about Ajax, as well as issues surrounding its usage. You will also build an Ajax application in PHP that will display panels of a section of a previously written tutorial. Clicking on a panel link will reload only the content section and replace it with the content of the selected panel, saving bandwidth and time loading the page.
    [Show full text]
  • Il Framework XAJAX
    Il framework XAJAX Vincenzo Della Mea (PWLS 6.11, 6.12, 6.13) Complementi di Tecnologie Web – M. Franceschet, V.Della Mea e I.Scagnetto - 1 Sommario • XAJAX – Principi e API • Un esempio semplice: – rivisitazione del cambio di colori dello sfondo della pagina corrente. • Un esempio complesso: – generazione “interattiva” del codice fiscale Complementi di Tecnologie Web – M. Franceschet, V.Della Mea e I.Scagnetto - 2 XAJAX • http://xajaxproject.org/ • Framework in PHP per lo sviluppo di applicazioni AJAX: – generazione automatica delle funzioni Javascript che ruotano attorno a XmlHttpRequest; – codice PHP per l’accesso al DOM della pagina (tradotto ovviamente in Javascript); – non è richiesta nessuna conoscenza di Javascript. Complementi di Tecnologie Web – M. Franceschet, V.Della Mea e I.Scagnetto - 3 XAJAX: Oggetti principali • xajax_core: – xajax – xajaxRequest – xajaxResponse – xajaxControl – xajaxPlugin • xajax_js: – DOM, events, CSS, … • xajax_controls: validatori (X)HTML, … • xajax_plugins: GoogleMaps, HTML table Complementi di Tecnologie Web – M. Franceschet, V.Della Mea e I.Scagnetto - 4 Tipico pattern di utilizzo • Solitamente si creano tre file PHP: – un file di configurazione, – un file per la componente lato server, – un file per la componente lato client. • Il file di configurazione viene incluso ed utilizzato dagli altri due. Complementi di Tecnologie Web – M. Franceschet, V.Della Mea e I.Scagnetto - 5 XAJAX: cosa fare • Configurazione: – si include la libreria di classi xajax per mezzo del file xajax.inc.php; – si dichiara ed istanzia un oggetto xajax; – si registrano i nomi delle funzioni fornite dal server e chiamate asincronamente dal client. • Server: – si include la configurazione; – si definiscono le funzioni registrate in modo che ritornino valori o modifichino il DOM; – si elaborano le richieste con apposito metodo processRequest.
    [Show full text]
  • XAJAX: Una Librería De AJAX Para PHP (Parte 1)
    XAJAX: una librería de AJAX para PHP (parte 1) AJAX es el acrónimo de Asynchronous Javascript And XML o Javascript y XML asíncronos dicho en nuestro idioma. Se trata de una combinación de tecnologías que se ha popularizado muchísimo desde hace unos años con la irrupción de la Web 2.0 y lo podemos encontrar en infinidad de páginas y servicios web como Gmail, Google Maps, Hotmail, Flickr y un largo etcétera. La clave de AJAX está en que es asíncrono, es decir, permite que la página del cliente realice peticiones al servidor sin recargar la página. Sólo se actualizan las partes de la página que nos interesan pero sin tener que recargar la página entera, lo que proporciona una sensación de navegación mucho más fluida. Para introducirnos en el mundo de AJAX vamos a utilizar una librería llamada XAJAX que nos permite aprovechar las capacidades de AJAX en nuestras páginas PHP. Podéis descargar esta librería en la página del proyecto http://xajaxproject.org/ A continuación, unos de códigos de ejemplo que se presentarán en diferentes capítulos para que sean más fáciles de leer. También se puede descargar la versión PDF con todos los ejemplos aquí. Y un Zip con los códigos fuente. Ejemplo 1. Introducción a la librería. Comencemos con un simple ‘Hola, mundo’ para ir calentando. En esta ocasión lo ponemos todo en el mismo archivo PHP llamado ‘holaAjax.php’. ‘holaAjax.php’ <?php require ('xajax/xajax.inc.php'); $xajax = new xajax(); function cambia_texto($mensaje){ $respuesta = new xajaxResponse(); $respuesta->addAssign("mensaje","innerHTML",$mensaje); return $respuesta; } $xajax->registerFunction("cambia_texto"); $xajax->processRequests(); ?> <html> <head> <?php $xajax->printJavascript("xajax/"); ?> </head> <body> <input type="button" onclick="xajax_cambia_texto('Hola Ajax);" value="Pulsa" /> <div id="mensaje"></div> </body> </html> Explicación: Lo primero que debemos hacer es importar la librería de xajax y crear una instancia de xajax: require ('xajax/xajax.inc.php'); xajax = new xajax(); A continuación definimos las funciones que se van a utilizar.
    [Show full text]
  • Overall Score for Your Score Is 56% | Grade B
    SeoSiteCheckup Report Overall score for http://www.powerpumpconcrete.com/ Your Score is 56% | Grade B 28 Important Fixes 0 Semi-Important Fixes 31 Passed Checks Title The title of your page have a length of 47 characters. Most search engines will truncate titles to 70 characters. Concrete Leveling & Repair - Powerpump Concrete Description The meta-description tag is missing from your page. You should include this tag in order to provide a brief description of your page which can be used by search engines or directories. HOW TO FIX In order to pass this test you must include a meta-description tag in your page header (<head> section): <head> <meta name="description" content="type_here_your_description"> </head> Note that in HTML the <meta> tag has no end tag but in XHTML this tag must be properly closed. Meta description can have any length but a good practice is to keep this up to 160 characters (search engines generally truncate snippets longer than this value). Keywords The meta-keywords tag is missing from your page. You should include meta-keywords to help indicate what your page is about to search engines. HOW TO FIX In order to pass this test you must include a meta-keywords tag in your page header (<head> section): <head> <meta name="keywords" content="keyword1, keyword2, keyword3"> </head> Separate keywords with commas and don't use any other punctuation beyond commas. Note that in HTML the <meta> tag has no end tag but in XHTML this tag must be properly closed. Most Common Keywords Test It appears that you can further optimize the density of your keywords above.
    [Show full text]