background preloader

Ajax

Facebook Twitter

Tutorial de Ajax con Prototype. Tutorial de Ajax con Prototype 18 dic aNieto2k hace 2672 días en: ajax, javascript, Programacion, webdev Via Del.icio.us me encuentro este tutorial bastante básico con el que podremos hacer funcionar nuestro Ajax usando Prototype como base de nuestras aplicaciones. Personalmente prefiero MooTools ya que además disponemos de efectos y el método send() me ha enamorado. Configurando tu aplicación Los pasos de configuración son bastante básicos, únicamente tendremos que declarar la inclusión de nuestro fichero prototype.js en el <head></head> de nuestra aplicación. Una vez añadida la librería a nuestra aplicación ya disponemos de todas las funcionalidades que esta nos ofrece, como por ejemplo $() o $F(), que se trata de una versión rápida de $('id').value. Var nombre=$F('nameUser'); var apellido=$F('surnameUser'); var direccion=$F('directionUser'); Una vez recogidos todos los elementos que necesitamos los fusionamos todos en un String para pasarla como parametros a la página siguiente.

Ajax. AJAX API | Grupos de Google. Dropthings - Ajax Web Portal - Home. AJAX APIs Playground. Home page for the xWinLib JavaScript library. YvoSchaap.com - Easy AJAX inline text edit 2.0. As everybody knows, refreshing pages is so 1999. AJAX, DOM, whatever you call it makes it possible to let people edit a piece of text inline without having to use a submit button. You say: but that ain’t new at all! I say: But all of this has been made easy to use and implement: 2.0! Example page: inline edit (no JS knowledge needed) [source ] | Inline example: Please edit me! How you can make it work (5 easy steps for integration) Download this javascript file: InstantEdit 2.0 JSCreate a update file that handles the input.

For example this PHP: update fileIn your page add the javascript: Optional: Set fixed vars (like hidden elements in a field post). You’re done! How it works A small piece of javascript reads all SPAN tags, checks if it has class=“editText” and a id=. Compatibility This script works in Internet Explorer, Firefox, Chrome, Opera and Safari. Update hack If you want to PUSH an ID to your script I use: id=“edit_userID_$userID”. Ajax Compilation - because you ajax it.