Section A.12. Chapter 13


A.12. Chapter 13

  1. The third, and optional, parameter of XMLHttpRequest.open is a Boolean value. Setting this to TRue, the default, the request is asynchronous; setting it to false makes the request synchronous.

  2. After getting a reference to the XMLHttpRequest object and opening it, assign the callback function through the onReadyStateChange property.

  3. The XMLHttpRequest objectâ??s readyState property needs to have a value of 4 for completed; the request objectâ??s HTTP status property should be 200 for a successful service request.

  4. Here are the three formats: HTML, which can be immediately added to the page without any formatting; XML, which can be formatted with XSLT; and JSON, which can be used in a eval function call to create a web structure ready for processing.

  5. From the Google Maps documentation, create a new GIcon object and populate its properties. Then use the object when creating the new GMarker object:

  6. var icon = new GIcon(â??â??); icon.image = "http://labs.google.com/ridefinder/images/mm_20_red.png"; icon.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png"; icon.iconSize = new GSize(12, 20); icon.shadowSize = new GSize(22, 20); icon.iconAnchor = new GPoint(6, 20); icon.infoWindowAnchor = new GPoint(5, 1); ... marker = new Gmarker(point,icon);




Learning JavaScript
Learning JavaScript, 2nd Edition
ISBN: 0596521871
EAN: 2147483647
Year: 2006
Pages: 151

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net