Ajax for Java Developers
Total Page:16
File Type:pdf, Size:1020Kb
If Evaluation 303-302-5280or you have are been being Ajax For sold taught Java on Developers the Eclipse/Tomcat Platform or email this out workbook, [email protected] LearningPatterns, Inc. Courseware this Copy workbook, please Student Guide call If Evaluation 303-302-5280or you have are been being . sold USA taught or email this out workbook, [email protected] this Copy license, customization and/or purchase. 12.487.9064 voice and fax -12 LearningPatterns Inc. 2 workbook, please This material is copyrighted by LearningPatterns Inc. This content and shall not be reproduced, edited, or distributed, in hard copy or soft copy format, without express written consent of LearningPatterns call Inc. Copyright © 2004 For more information about Java or Enterprise., in the Java, United and States related and courseware,other countries. please LearningPatterns contact us. and its logos are Our courses are available globally for LearningPatterns. Inc. Global Java Courseware Services 262 Main St. #12 | Beacon, NY 12508 Java, Enterprise JavaBeans and all Java-based trademarks and logo trademarks are registered trademarks of Sun Microsystems, Inc trademarks of LearningPatterns Inc. All other products referenced herein are trademarks of their respective holders ™ Table of Contents - Ajax for Java Developers AJAX FOR JAVA DEVELOPERS ............................................................................................................ 1 WORKSHOP OVERVIEW ............................................................................................................................... 2 WORKSHOP OBJECTIVES ............................................................................................................................. 3 WORKSHOP AGENDA .................................................................................................................................. 4 COURSE PREREQUISITES.............................................................................................................................. 5 RELEASE LEVEL .......................................................................................................................................... 6 SESSION 1: AJAX OVERVIEW................................................................................................................ 7 LESSON OBJECTIVES ................................................................................................................................... 8 If Evaluation RICH INTERNET APPLICATIONS......................................................................................................... 9 or you 303-302-5280WHAT ARE RICH INTERNET APPLICATIONS ............................................................................................... 10 haveRIA T ECHNOLOGIES.................................................................................................................................. 11 DOJO FISHEYEareLIST WIDGET DEMO........................................................................................................... 12 AJAX INTRODUCTION .......................................................................................................................... 13 WHAT ISbeen AJAX ............................................................................................................................... being ........... 14 AJAX EXAMPLE – GOOGLE SUGGEST ........................................................................................................ 15 RIA/AJAX EXAMPLE – GOOGLE MAPS...................................................................................................... 16 THE AJAX DIFFERENCE ............................................................................................................................. 18 AJAX, JAVASCRIPT,sold DHTML AND MORE ................................................................................................. 19 XMLHTTPREQUEST...............................................................................................................................taught ... 20 XMLHTTPRorEQUEST EXAMPLE ................................................................................................................. 21 WHAT THIS COURSEemail WILL F OCUS ON ...................................................................................................... 22 LAB 1.1 – SETTING UP THE EthisNVIRONMENT ............................................................................................ 23 SESSION 2: JAVASCRIPT BASICS ...................................................................................................out .... 47 workbook, LESSON OBJECTIVES ...............................................................................................................................training@itcourseware.com. .. 48 JAVASCRIPT INTRODUCTION........................................................................................................of .... 49 WHAT IS JAVASCRIPT...............................................................................................................................this .50 EXPLORING JAVASCRIPT ...........................................................................................................................Copy 51 JAVASCRIPT VARIABLES ........................................................................................................................... 53 JAVASCRIPT - WRITING TO THE WEB PAGE...............................................................................................workbook, 54 JAVASCRIPT POPUP BOXES.......................................................................................................................please 56 LAB 2.1 – USE JAVASCRIPT IN AN HTML PAGE .................................................................................... 57 JAVASCRIPT FUNCTIONS .................................................................................................................... 61 JAVASCRIPT FUNCTION OVERVIEW........................................................................................................... 62 JAVASCRIPT FUNCTION EXAMPLE.............................................................................................................call 63 EXTERNAL JAVASCRIPT FILES .................................................................................................................. 65 FUNCTIONS AS DATA................................................................................................................................. 66 STANDARD JAVASCRIPT FUNCTIONS......................................................................................................... 67 LAB 2.2 – USE JAVASCRIPT FUNCTIONS ................................................................................................. 68 ACCESSING AND MODIFYING HTML ELEMENTS........................................................................ 77 A MORE COMPLEX HTML PAGE .............................................................................................................. 78 ACCESSING ELEMENTS VIA THE DOCUMENT OBJECT................................................................................. 79 THE INNERHTML PROPERTY .................................................................................................................... 80 EXAMPLE - MODIFYING AN HTML PAGE.................................................................................................. 81 LAB 2.3 – ACCESSING AND MODIFYING HTML ELEMENTS .................................................................. 83 20090403 Copyright © 2007-9, LearningPatterns Inc. All rights reserved i REVIEW QUESTIONS .................................................................................................................................. 87 LESSON SUMMARY.................................................................................................................................... 88 SESSION 3: XMLHTTPREQUEST......................................................................................................... 89 LESSON OBJECTIVES ................................................................................................................................. 90 XMLHTTPREQUEST BASICS ............................................................................................................... 91 MORE ABOUT XMLHTTPREQUEST........................................................................................................... 92 CREATING AN XMLHTTPREQUEST OBJECT .............................................................................................. 93 SUBMITTING A REQUEST ........................................................................................................................... 96 XMLHTTPREQUEST PROPERTIES.............................................................................................................. 98 EXAMPLE – SUBMITTING A REQUEST ........................................................................................................ 99 RESULT – SUBMITTING A REQUEST ......................................................................................................... 100 IfL AB 3.1 – WEvaluationORKING WITH XMLHTTPREQUEST ................................................................................. 101 303-302-5280or ASYNCHRONOUSyou REQUESTS............................................................................................................ 107 HANDLING AN ASYNCHRONOUS