Commit ec1fc1a2 authored by O'Reilly Media, Inc.'s avatar O'Reilly Media, Inc.
Browse files

Initial commit

parents
Loading
Loading
Loading
Loading

README.md

0 → 100644
+15 −0
Changes for README.md: 15 added lines, 0 removed lines.
Original line number Diff line number Diff line
## Example files for the title:  
	  
# Ajax: The Definitive Guide, by Anthony Holdener
	  
[![Ajax: The Definitive Guide, by Anthony Holdener](http://akamaicovers.oreilly.com/images/9780596528386/cat.gif)](https://www.safaribooksonline.com/library/view/title/9780596528386//)
	  
The following applies to example files from material published by O’Reilly Media, Inc. Content from other publishers may include different rules of usage. Please refer to any additional usage rights explained in the actual example files or refer to the publisher’s website.
	  
O'Reilly books are here to help you get your job done. In general, you may use the code in O'Reilly books in your programs and documentation. You do not need to contact us for permission unless you're reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from our books does not require permission. Answering a question by citing our books and quoting example code does not require permission. On the other hand, selling or distributing a CD-ROM of examples from O'Reilly books does require permission. Incorporating a significant amount of example code from our books into your product's documentation does require permission.
	  
We appreciate, but do not require, attribution. An attribution usually includes the title, author, publisher, and ISBN.
	  
If you think your use of code examples falls outside fair use or the permission given here, feel free to contact us at <permissions@oreilly.com>.
	  
Please note that the examples are not production code and have not been carefully testing. They are provided "as-is" and come with no warranty of any kind.
+12 −0
Changes for examples/example_1-1.html: 12 added lines, 0 removed lines.
Original line number Diff line number Diff line
<pre>
&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"&gt;
    &lt;head&gt;
        &lt;title&gt;Example 1-1. The simplest XHTML 1.1 document&lt;/title&gt;
	&lt;meta http-equiv="content-type" content="text/xml; charset=utf-8" /&gt;
    &lt;/head&gt;
    &lt;body&gt;
        &lt;div&gt;Hello World!&lt;/div&gt;
    &lt;/body&gt;
&lt;/html&gt;
</pre>
 No newline at end of file
+29 −0
Changes for examples/example_1-2.html: 29 added lines, 0 removed lines.
Original line number Diff line number Diff line
<pre>
&lt;?xml version="1.0"?&gt;
&lt;rss version="2.0"&gt;
    &lt;channel&gt;
        &lt;title&gt;O'Reilly News/Articles&lt;/title&gt;
        &lt;link&gt;http://www.oreilly.com/&lt;/link&gt;
        &lt;description&gt;O'Reilly's News/Articles&lt;/description&gt;
        &lt;copyright&gt;Copyright O'Reilly Media, Inc.&lt;/copyright&gt;
        &lt;language&gt;en-US&lt;/language&gt;
        &lt;docs&gt;http://blogs.law.harvard.edu/tech/rss&lt;/docs&gt;
        &lt;item&gt;
            &lt;title&gt;Buy Two Books, Get the Third Free!&lt;/title&gt;
            &lt;link&gt;http://www.oreilly.com/store&lt;/link&gt;
            &lt;guid&gt;http://www.oreilly.com/store&lt;/guid&gt;
            &lt;description&gt;&lt;![CDATA[ (description edited for display purposes...) ]]&gt;&lt;/description&gt;
            &lt;author&gt;webmaster@oreillynet.com (O'Reilly Media, Inc.)&lt;/author&gt;
            &lt;dc:date&gt;&lt;/dc:date&gt;
        &lt;/item&gt;
        &lt;item&gt;
            &lt;title&gt;New! O'Reilly Photography Learning Center&lt;/title&gt;
            &lt;link&gt;http://digitalmedia.oreilly.com/learningcenter/&lt;/link&gt;
            &lt;guid&gt;http://digitalmedia.oreilly.com/learningcenter/&lt;/guid&gt;
            &lt;description&gt;&lt;![CDATA[ (description edited for display purposes...) ]]&gt;&lt;/description&gt;
            &lt;author&gt;webmaster@oreillynet.com (O'Reilly Media, Inc.)&lt;/author&gt;
            &lt;dc:date&gt;&lt;/dc:date&gt;
        &lt;/item&gt;
    &lt;/channel&gt;
&lt;/rss&gt;
</pre>
 No newline at end of file
+31 −0
Changes for examples/example_1-3.html: 31 added lines, 0 removed lines.
Original line number Diff line number Diff line
<pre>
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US"&gt;
    &lt;title&gt;O'Reilly News/Articles&lt;/title&gt;
    &lt;link rel="alternate" type="text/html" href="http://www.oreilly.com/" /&gt;
    &lt;subtitle type="text"&gt;O'Reilly's News/Articles&lt;/subtitle&gt;
    &lt;rights&gt;Copyright O'Reilly Media, Inc.&lt;/rights&gt;
    &lt;id&gt;http://www.oreilly.com/&lt;/id&gt;
    &lt;updated&gt;&lt;/updated&gt;
    &lt;entry&gt;
        &lt;title&gt;Buy Two Books, Get the Third Free!&lt;/title&gt;
        &lt;id&gt;http://www.oreilly.com/store&lt;/id&gt;
        &lt;link rel="alternate" href="http://www.oreilly.com/store" /&gt;
        &lt;summary type="html"&gt; &lt;/summary&gt;
        &lt;author&gt;
            &lt;name&gt;O'Reilly Media, Inc.&lt;/name&gt;
        &lt;/author&gt;
        &lt;updated&gt;&lt;/updated&gt;
    &lt;/entry&gt;
    &lt;entry&gt;
        &lt;title&gt;New! O'Reilly Photography Learning Center&lt;/title&gt;
        &lt;id&gt;http://digitalmedia.oreilly.com/learningcenter/&lt;/id&gt;
        &lt;link rel="alternate" href="http://digitalmedia.oreilly.com/learningcenter/" /&gt;
        &lt;summary type="html"&gt; &lt;/summary&gt;
        &lt;author&gt;
            &lt;name&gt;O'Reilly Media, Inc.&lt;/name&gt;
        &lt;/author&gt;
        &lt;updated&gt;&lt;/updated&gt;
    &lt;/entry&gt;	
&lt;/feed&gt;
</pre>
 No newline at end of file
+50 −0
Changes for examples/example_10-1.js: 50 added lines, 0 removed lines.
Original line number Diff line number Diff line
/* This example is from the book _Ajax: The Definitive Guide_ by Anthony T. Holdener III.
 * Written by Anthony T. Holdener III.  Copyright (C) 2008 O'Reilly Media, Inc.
 * You may study, use, modify, and distribute this example for any purpose.
 * This example is provided WITHOUT WARRANTY either expressed or implied.
 */
/**
 * This function, focusOnPopUp, traps all mouse clicks on the page, and when our
 * custom pop-up window is "open", it determines if the click was on the pop-up
 * window or elsewhere on the page. When the mouse click is not on the pop-up
 * window, the event is stopped and the focus is returned to the pop-up window.
 * Otherwise, the focus goes where it was intended and the event carries on as
 * usual.
 *
 * @param {Event} e The event that has fired in the browser.
 */
function focusOnPopUp(e) {
	/*
	 * This is the cross-browser way of getting the target of the event in
	 * question.
	 */
	var el = ((e.target) ? e.target : e.srcElement);

	/* Is our pop-up window currently active? */
	if (Element.visible('popupContainer')) {
		/* Is the event target our pop-up window? */
		if (el.id != 'popupContainer') {
			var childNode = false;

			/*
			 * Walk the DOM and find out if this element is a child of the
			 * /popupContainer/
			 */
			for (var child = el.parentNode; child.tagName != 'BODY'; child = child.parentNode)
				/* Is the target element a childNode of the pop-up container? */
				if (child.id == 'popupContainer') {
					childNode = true;
					break;
				}
			/* Is the event part of our pop-up window? */
			if (!childNode) {
				Event.stop(e);
				$('btnOk').focus( );
			/* Give the event target focus, since it is part of the pop-up window */
			} else
				el.focus( );
		}
	/* Give the event target focus, since the pop-up window is not active */
	} else
		el.focus( );
}
 No newline at end of file
Loading