160 likes | 181 Views
Dive deep into Ajax fundamentals, form handling, and UI enhancements with comprehensive instructions and practical examples.
E N D
The Write Less, Do More, JavaScript Library Nuno Simões Project Manager Galileo Team Coimbra, April 27th, 2009
Agenda • What’s Ajax anyway • Understanding HTML Forms • JavaScript my Page • Collecting Form values from JavaScript • POSTing Values with magic • The Code Behind and return content • Joining Pieces • Some UI Tweeks
Understanding HTML Forms FormOpening
Understanding HTML Forms A text input A submitbutton
Understanding HTML Forms Twoselect elements. The Secondone populatedwith theAjaxcall ofthefirstone
JavaScript My Page Inline javascript opening method Valueextracting Ajaxcall
POSTing Values With Magic variable “a” withthe URL ofvariables Typeofformsend Thevariable to besent The url oftheajaxmethod
The Code Behind and return content • On code behind should be all the code necessary to perform the necessary actions; • The content returned will be the HTML code to be placed inside the element indicated on the JavaScript method, and should be returned with an output action (like System.out.print();)
Some UI Tweeks • Ingrid (http://www.reconstrukt.com/ingrid/) • jQueryGridPlugin (http://www.trirand.com/blog/?page_id=5) • AutoCompleter (http://nodstrum.com/2007/09/19/autocompleter/) • SimpleTree (http://news.kg/wp-content/uploads/tree/d&d/) • Draganddrop (http://interface.eyecon.ro/demos/drag.html) • More demos (http://interface.eyecon.ro/demos/?page=demos)