In questo tutorial vedremo come realizzare uno script per l’autocompletamento in ajax che prende i valori da un database
Come prima cosa dobbiamo scaricare l’ultima versione della libreria javascript script.a.culos qui
Scarichiamo e mettiamo come codice
<script language="JavaScript" SRC="lib/prototype.js"></script>
<script language="Javascript" src="javascript/scriptaculous.js"> </script>
<script language="Javascript" src="javascript/effects.js"> </script>
<script language="Javascript" src="javascript/controls.js"> </script>
Inserite le librerie necessarie al funzionamento dello script, inseriamo la parte di codice che gestisce il campo da autocompletare
<input type="text" id="search" name="search" />
<div id="hint"></div>
<script type="text/javascript">
new Ajax.Autocompleter("search","hint","fillfield.php");
</script>
Il file fillfield.php è il file che mostrerà tutte le possibili parole che possono essere utili al completamento del campo
<?php
// cambia le impostazioni per …

inwriter è una libreria javascript piccola che ti permette di gestire facilmente l’evento edit in place. Oppure un ottimo tutorial in italiano http://free-script.it/post/Script_ajax_Edit…loco-38.htm
Sito web: http://digitalhymn.com/argilla/inwriter/…
The JavaScript Programming Language (by Douglas Crockford)
Yahoo! JavaScript Architect Douglas Crockford provides a comprehensive introduction to the JavaScript Programming Language in this four-part video:
…
…
In questo articolo vedremo come creare un sistema per creare un sistema di login sicuro usando XMLHttpRequest. Questo esempio è un sistema per il login che nn richiede il refresh della pagina ma veramente sicuro.
Vantaggi
User does not need to refresh the page to login.
User is notified instantly on incorrect username/password combination.
Overall user experience is more seamless.
Password is not sent in plain text ever (more secure than traditional system).
Javascript convenience with server-side security (uses PHP/MySQL).
Uses one-time use random seed to hash the password before sending (making interceptions useless).
Svantaggi
System is more prone to brute force attacks.
Can be minimized by adding a delay …

Sul sito http://www.javapassion.com/ajaxcodecamp/index.html cè un corso gratuito di ajax online da Sang Shin, sang.shin@sun.com, Sun Microsystems, www.javapassion.com/ajaxcodecamp.
…
In questo articolo vedremo come realizzare uno script per il carrello elettronico con drag e drop e ajax.
The first most common mistake is to do all animation effects at a constant speed. For many types of effects, linear/constant speed animation looks clunky because the animation starts and stops and so abruptly. The solution is to adjust the speed of the animation based on a sinusoidal curve rather than a line so that the transition looks smoother — basically, it should start slow and end slow and speed up in the middle.
The second most common mistake is to do all animation at a constant frame rate. Given the dramatic DOM performance differences between web browsers and operating systems, an animation with a constant number of frames can …
L’upload di file asynchrono è uno delle richieste maggiori nelle applicazioni web basate su ajax. La classe standard di AJAX (XmlHttpRequest) non ha la capacità di processare p inviare file da una finestra di dialogo (input type="file"). Questo articolo contiene un esempio du applicazione (trivial file-sharing service, come rapidshare, megaupload o yousendit) che usa embedded frames (IFRAME) per l’upload di file. Mentre un file è uplodato nel frame hidden ,l’utente puo accedere ala pagina web.
http://www.anyexample.com/programming/php/php_ajax_example__asynchronous_file_upload.xml…
…
• onreadystatechange
– Event handler that fires at each state change
– You implement your own function that handles this
• readyState – sato corrente della richiesta
– 0 = uninitialized
– 1 = loading
– 2 = loaded
– 3 = interactive (some data has been returned)
– 4 = complete
• status
– HTTP Status ritornato dal server: 200 = OK
• responseText
– String version dei dati ritornati dal server
• responseXML
– XML DOM document dei dati ritornati
• statusText
– Testo dello status ritornato dal server…