| Autor |
Mesaj |
wap-klub
Junior 2

Data inscrierii: 12/Noi/2010 Mesaje: 34
|
|
Traditional Web Application |
|
1 First, the application shows a list of employees to pick from. (AjaxBasics/Demos/EmployeeAdmin.jsp)
1 When the user chooses an employee, the server returns a new page (FIRST REFRESH) and a form is displayed. (AjaxBasics/Demos/EditEmployee.jsp)
3 The user can then edit the employee data (e.g, change "Andrew" to "Andy") and submit the form. The server then returns the new page (SECOND REFRESH). (AjaxBasics/Demos/EditEmployee.jsp)
4 To get back to the employee list to begin the process of modifying another employee's data, the user would have to click on the "Employee List" link (THIRD REFRESH).
An Ajax Web Application
Ajax makes this process much simpler for the user. Records, and even individual fields of a record, can be edited one at a time without full page refreshes. This method is illustrated below.
Like with the traditional method, the Ajax application shows a list of employees to pick from. (AjaxBasics/Solutions/EmployeeAdmin.html)
When the user chooses an employee, the page doesn't reload. Instead, an Ajax call to the server is made, the server returns the HTML form and JavaScript is used to display the form on the page. The user can then edit the form fields. Each time a changed form field loses focus the change is sent to the server with Ajax, the server-side code updates the data in the database and sends back the updated list of employees to the browser. JavaScript is again used to display the updated list on the page. The employee list is updated to reflect the changes made. Notice "Andrew" has been changed to "Andy" in the list. A message is displayed letting the user know that the database was updated. (see footnote)
|
|
| 12/11/2010 18:34 |
|
 |
|
|
Nu puteti crea un subiect nou in acest forum Nu puteti raspunde in subiectele acestui forum Nu puteti modifica mesajele proprii din acest forum Nu puteti sterge mesajele proprii din acest forum Nu puteti vota in chestionarele din acest forum
|
|
|